Web services technology is becoming an important technological trend in Web application development and integration. Based on open standards, such as SOAP, WSDL, and UDDI, Web services allow Webbased applications to communicate with each other through standardized XML messaging and to form loosely coupled distributed systems. Although the open feature of Web services benefits service providers in servicing consumers, the unlimited computing resources access of Web services to network bandwidth, storage throughput, and CPU time may lead to overexploitation of the resources when applications based on the Web services technology are widely accepted. Therefore, it is critical to optimize the operation of Web services, subject to the QoS requirements of service requests, to assure the total benefits of the service providers and the service consumers. This paper proposes a usage-based dynamic pricing approach to optimizing resource allocation of Web services in the principle of economics, and reports on a pilot implementation demonstrating the technical feasibility of the proposed approach.