Tutorials > Management Center > Create the Project BOD service module
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:
- Interfaces of the service provided for each noun
- A file containing constants that is sharable between client and server
- A client package that contains
- The abstract client Java class that contains common methods and methods required
- A programming friendly Web enabled Java class that extends from the abstract class to implement the Java friendly and Web enabled methods
- Noun specific exceptions to represent client errors and server errors
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
- Import the provided ProjectFacadeConstants class:
- In the Enterprise Explorer view, navigate to Project-Client/src and right-click the com.mycompany.commerce.project.facade package.
- Click Import. Expand General and select File System. Click Next.
- Browse to the temporary location where you unzipped RecipeServices.zip. Browse to the com.mycompany.commerce.project.facade folder.
- Select ProjectFacadeConstants.java. Click Finish.
- Click Yes to All to overwrite the existing file.
- Import the provided ProjectFacadeClient.java class containing the Java friendly client methods:
- In the Enterprise Explorer view, navigate to Project-Client/src and right-click the com.mycompany.commerce.project.facade.client package.
- Click Import. Expand General and select File System. Click Next.
- Browse to the temporary location where you unzipped RecipeServices.zip. Browse to the com.mycompany.commerce.project.facade.client folder.
- Select ProjectFacadeClient.java. Click Finish.
- Click Yes to All to overwrite the existing file.
- Organize the imports for the Project-Client project:
- Open the Java perspective in WebSphere Commerce Developer.
- Right-click the Project-Client\src folder and select Source.
- Click Organize Imports.