Tutorials > Management Center > Create the Project BOD service module

< Previous | Next >


Implement the client library

The primary purpose of the client library is to simplify and eliminate code on the client. The client library is essentially a Java layer to help Java applications integrate with the service architecture, with no additional code generation required. The client library already has support for session and authentication and provides Java-based clients a standardized mechanism to create the logical SDO objects to represent service requests.

Each service module provides a client library project to access the services provided by the module. The client project contains the following assets:

This lesson of the tutorial demonstrates how to add convenience methods that hide the complexity of creating the different GetProject, ChangeProject and ProcessProject requests.


Procedure

  1. Import the provided ProjectFacadeConstants class:

    1. In the Enterprise Explorer view, navigate to Project-Client/src and right-click the com.mycompany.commerce.project.facade package.

    2. Click Import. Expand General and select File System. Click Next.

    3. Browse to the temporary location where you unzipped RecipeServices.zip. Browse to the com.mycompany.commerce.project.facade folder.

    4. Select ProjectFacadeConstants.java. Click Finish.

    5. Click Yes to All to overwrite the existing file.

  2. Import the provided ProjectFacadeClient.java class containing the Java friendly client methods:

    1. In the Enterprise Explorer view, navigate to Project-Client/src and right-click the com.mycompany.commerce.project.facade.client package.

    2. Click Import. Expand General and select File System. Click Next.

    3. Browse to the temporary location where you unzipped RecipeServices.zip. Browse to the com.mycompany.commerce.project.facade.client folder.

    4. Select ProjectFacadeClient.java. Click Finish.

    5. Click Yes to All to overwrite the existing file.

  3. Organize the imports for the Project-Client project:

    1. Open the Java perspective in WebSphere Commerce Developer.

    2. Right-click the Project-Client\src folder and select Source.

    3. Click Organize Imports.

< Previous | Next >


+

Search Tips   |   Advanced Search