In this lesson, you generate the sample user web service
to test the client API and message configuration that you completed
in the previous steps.
Procedure
- Create a new dynamic web project in WebSphere Commerce
Developer to contain the sample system.
- .
- In the Project Name field, type: MyCompanyMemberServices.
- Ensure the Add project to an EAR option
is selected:
- EAR project: MyCompanyMemberServicesEAR.
- Click Finish.
- Import the MyCompanyMemberServices.wsdl:
- In the Enterprise Explorer view ,
expand the folder.
- Right-click the WebContent folder.
- Select .
- Name the folder wsdl.
- Click Finish.
- Right-click the wsdl folder.
- Select .
- Click Next.
- Browse to the temporary directory that contains the MyCompanyMemberServices.wsdl file
that you previously downloaded and select this file.
- Click Finish.
- Generate the MyCompanyMemberServices web service skeleton:
- In the Enterprise Explorer view ,
expand the folder.
- Right-click the MyCompanyMemberServices.wsdl.
- Select .
- In the Java Bean Skeleton wizard click .
- Add a sample return message to the generated web service:
- In the Enterprise Explorer view ,
expand the package.
- Open MyCompanyMemberServicesImpl.java
for editing.
- Replace the body of the PushUser method
with the following code:
result.value = "Success";
userIdentifier.value = user.getUserIdentifier();
- Save and close the file.
- Change the virtual host of the web Service to WC_default_host:
- In the Enterprise Explorer view ,
expand the folder.
- Open the ibm-web-bnd.xml file.
- Change the virtualHostName to " WC_default_host ".
- Save and close the file.
What to do next
After you complete these steps, the sample MyCompanyMember
member management system is generated. The next step is to deploy
and test WebSphere Commerce with the integrated MyCompanyMember client
and the sample member management system.