Tutorial: Creating an outbound Web service client for WebSphere Commerce >
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.
- Add the MyCompanyMemberDataObjects project to the WC application.
- In the Project Explorer, expand Enterprise Applications >
WC project.
- Open the Deployment Descriptor.
- Select the Module Tab.
- Under Project Utility JARs, click Add.
- Select MyCompanyMemberDataObjects.
- Click Finish.
- Save the file (Ctrl s).
- Reference the MyCompanyMemberDataObjects project from the Stores manifest file.
- In the Project Explorer, expand Dynamic Web Projects > the Stores project > WebContent > META-INF folder.
- Right-click on the MANIFEST.MF file
- Select Open with > JAR Dependency Editor.
- Under Dependencies, select MyCompanyMemberDataObjects.jar.
- Save the file (Ctrl s).
- Start or restart WebSphere Commerce server.
- If the WC and MyCompanyMemberServicesEAR projects are not already published to the WebSphere Commerce Test Server, ensure both projects are published:
- On the Server page, right-click the WebSphere Commerce Test Server and select Add and Remove Projects.
- Select the WC and MyCompanyMemberServicesEAR projects.
- Click Add.
- Click Finish.
If the WC or MyCompanyMemberServicesEAR projects are already added, right-click the WebSphere Commerce Test Server and select Publish.
- Set up a TCP/IP monitor in WebSphere Commerce Developer. You will use this TCP/IP monitor to observe the request and response messages travelling between WebSphere Commerce and the external member management system.
- Select Window > Preferences.
- From the Preferences panel select Internet > TCP/IP Monitor.
- Click Add.
- Type the following information:
- Local monitoring port:81.
- Hostname:localhost.
- Port:80
- Type:TCP/IP
- Click OK.
- Select the created TCP/IP monitor.
- Click Start.
- Click OK.
- Open http://localhost/webapp/wcs/stores/servlet/ConsumerDirect/index.jsp in a Web browser.
- Click Sign In.
- Click Register.
- Enter test data in the required fields.
- Click Submit.
- View the request and response messages in the TCP/IP monitor.