Tutorial: Creating an outbound Web service client for WebSphere Commerce
This tutorial covers the creation of the MyCompanyMember outbound Web service client. This client will be used to integrate WebSphere Commerce 6 with a sample Web service which manages users. The MyCompanyMember Web service client will integrate with the UserRegistrationAdd and UserRegistrationUpdate commands to push new and updated user registration information to the sample system.
Learning objectives
The sample Web service called by the client consists of a PushUser message that contains user registration information and a PushUserConfirmation response that contains confirmation of the request. Service Data Objects (SDO) are used by the MyCompanyMember client to build the PushUser request message and handle the PushUserConfirmation response generated from the sample system. The tutorial results will be tested by registering a new user in the ConsumerDirect sample store and viewing the PushUser request and PushUserConfirmation response message sent between WebSphere Commerce and the sample user Web service. The following diagram illustrates:
- The integration of the MyCompanyMember client API with the WebSphere Commerce user registration commands.
- The integration of the MyCompanyMember client API with the WebSphere Commerce messaging system.
- The consumption of the MyCompanyMemberServices Web service by WebSphere Commerce.
Time required
Expect this tutorial to take 4 hours to complete.
Audience
This tutorial is intended for WebSphere Commerce developers who are responsible for integrating WebSphere Commerce with an external system.
Prerequisites
Before beginning this tutorial ensure that you have fulfilled the following prerequisites:
- Installed WebSphere Commerce Developer.
- Installed WebSphere Commerce Developer Fix Pack 1.
- Installed WebSphere Commerce Feature Pack 1.
- Enabled the JCA for Web services feature.
To complete this tutorial you should be familiar with the following terms and concepts:
- Web services
- WebSphere Commerce Developer
- An understanding of the Java programming language.
- A basic understanding of the database type used in your WebSphere Commerce development environment.
- A basic understanding of access beans.
- A basic understanding of XML.
Lessons in this tutorial
- Set up the development environment for creating an outbound Web Service
This section is related to setting up the development environment for creating an outbound Web Service.- Generating the MyCompanyMember data objects from the external system WSDL
In this step you will generate Java objects called service data objects (SDO) from the MyCompanyMemberServices.wsdl. These objects represent the request and response messages to the sample Web service.- Implementing the MyCompanyMember client API
In the step you will create the MyCompanyMember client API in the WebSphereCommerceServerExtensionsLogic project. This API uses the SDOs generated in the previous step to send request messages and handle response messages.- Create a task command to send and receive messages
In this step, you will create a new task command that will build a PushUser request SDO, use the MyCompanyMember client API to transmit the message, and handle the PushUserConfirmation response SDO.- Integrating the MyCompanyMember client API with WebSphere Commerce
This section is related to integrating the MyCompanyMember client API with WebSphere Commerce.- Configure the WebSphere Commerce messaging system
In this step you will create a new message type for this tutorial and configure the new message type to point to the sample Web service.- Generating the MyCompanyMemberServices sample user Web service
In this step you will generate the sample user Web service to test the client API and message configuration performed in the previous steps.- Deploying and validating the MyCompanyMember client
In this step you will test the integration completed in the preceding steps by registering a user in the ConsumerDirect sample store. This will generate and transmit a message with user registration information to the sample Web service.- Create an outbound Web service client for WebSphere Commerce summary
This section summarizes the tutorial.