WebSphere Commerce Web services with JSP pages

A Web service is an interface that describes a collection of operations that are accessible through the network by using standardized XML messaging. A Web service is described using a standard, formal XML notation, called a service description. The service description includes all the details necessary to interact with the service, including its message formats (that detail the operations), transport protocols, and location. The interface hides the implementation details of the service, allowing it to be used independently of the hardware or software platform on which it is implemented and also independently of the programming language in which it is written. The foundation for Web services are standards such as simple object access protocol (SOAP), the Web Services Description Language (WSDL), and the Universal Description, Discovery, and Integration (UDDI) registry.

WebSphere Commerce includes code and documentation that allow you to enable WebSphere Commerce business operations as Web services. You can allow WebSphere Commerce to be the service provider by enabling its business functions as Web services that can be accessed by external systems. You can also allow WebSphere Commerce to be the service consumer by enabling it to invoke Web services that are hosted by external systems.

Note: WebSphere Commerce Web services in WebSphere Commerce version 6 use JSP pages to compose responses. The services released in WebSphere Commerce Version 6 Feature Pack 2 and WebSphere Commerce Version 7 use a new functional architecture. For more information, see Web services and WebSphere Commerce.

Why use Web services?

Web services are self-contained, self-describing, modular Web applications that can be published, located, and invoked across the Web. Web services perform functions that can be invoked, ranging from a simple request to complicated business operations. Once a Web service is deployed and registered, other applications can discover and invoke it.

Web services allow applications to be integrated more rapidly, easily, and less expensively than ever before. Integration focuses on the XML messages that define the services rather than the protocol used to relay these messages. These characteristics are ideal for connecting business functions across the Web, both between multiple enterprises and within a single enterprise. They provide a unifying programming model, so that application integration, both inside and outside the enterprise, can be done with a common approach, leveraging a common infrastructure. The integration and application of Web services can be done in an incremental manner, using existing languages and platforms and by adopting existing applications.

WebSphere Commerce is designed to support Web services, both as a provider of Web services and as a consumer (client) to other Web services. For example, external Web service clients can connect to WebSphere Commerce and use the Web services provided, as illustrated in the following diagram.


Diagram summarizing the high-level flow associated with WebSphere Commerce as a service provider: Web service clients send SOAP requests to and receive SOAP responses from WebSphere Commerce.

Alternatively, WebSphere Commerce can connect to other Web service providers and request information, as illustrated in the following diagram.


Diagram summarizing the high-level flow associated with WebSphere Commerce as a service consumer: WebSphere Commerce sends SOAP requests to and receives SOAP responses from Web service providers.

Web service architecture

The Web service architecture describes three roles: service provider, service consumer, and service broker; and three basic operations: publish, find, and bind. A network component can play any or all of these roles. The service providers publish Web services to a service broker. Service consumers find required Web services by using a service broker and bind to them.


Diagram summarizing the Web service architecture roles and operations detailed in this section.

In a typical scenario, a service provider hosts a network-accessible service module, which is an implementation of a Web service. The service provider defines a service description for the Web service and publishes it to a service consumer or a service registry. The service consumer uses a find operation to retrieve the service description locally or from the service registry hosted by the service broker. The service consumer uses the service description to bind with the service provider and invoke or interact with the Web service implementation.

This solution provides runtime support to enable business operations that are defined by WebSphere Commerce as Web services.