Tutorial: Creating an outbound Web service client for WebSphere Commerce >

< Previous | Next >

 

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.

Create a new dynamic web project in WebSphere Commerce Developer to contain the sample system.

  1. File > New > Dynamic Web Project.

    1. Select Show Advanced.

    2. In the Name field, type: MyCompanyMemberServices.

    3. Ensure the Add module to EAR project option is selected:

      1. EAR project: MyCompanyMemberServicesEAR

      2. Context Root: MyCompanyMemberServices

    4. Click Finish.

  1. In the Project Explorer, expand the MyCompanyMemberServices project > WebContent folder.

  2. Right-click on the WebContent folder.

  3. Select New > Folder.

  4. Name the folder wsdl.

  5. Click Finish.

  6. Right-click on the wsdl folder.

  7. Select Import > FileSystem.

  8. Click Next.

  9. Browse to the temporary directory holding MyCompanyMemberServices.wsdl (previously downloaded) and select MyCompanyMemberServices.wsdl.

  10. Click Finish.

  1. In the Project Explorer, expand the MyCompanyMemberServices project > WebContent > wsdl folder.

  2. Right-click on the MyCompanyMemberServices.wsdl.

  3. Select WebServices > Generate Java Bean Skeleton.

  4. Click Next.

  5. Click Next.

  6. Click Edit.

  7. Select IBM WebSphere for the Web service runtime.

  8. Click OK.

  9. Click Finish.

  1. In the Project Explorer, expand the MyCompanyMemberServices project > Java Resources > JavaSource > com.mycompany.www package.

  2. Open MyCompanyMemberServicesImpl.java.

  3. Replace the body of the PushUser method with the following:
    result.value = "Success";
    userIdentifier.value = user.getUserIdentifier();

  4. Save the file (Ctrl S).

  1. In the Project Explorer, expand the MyCompanyMemberServices project > WebContent > WEB-INF folder.

  2. Open the ibm-web-bnd.xmi file.

  3. Change the virtualHostName to " WC_default_host".

  4. Save the file (Ctrl S).

After completing these steps, the sample MyCompanyMember member management system has been generated. The next step is to deploy and test WebSphere Commerce with the integrated MyCompanyMember client and the sample member management system.

< Previous | Next >