Work with WebSphere Commerce services
Work with WebSphere Commerce services involves developing client libraries, new commands, and business logic. The Java Emitter Template (JET) is provided and documented to assist you with these tasks.
WebSphere Commerce parses the top-level element in a Web service response. If the Web service requires additional parsing, for example, the entire body, it is recommended that you use a WebSphere Application Server JAX-RPC client.
- Enable WebSphere Commerce foundation
The WebSphere Commerce foundation feature adds new groups of services to the WebSphere Commerce Server.
- Disable WebSphere Commerce foundation
You can disable WebSphere Commerce foundation by running the disablement script.
- Install the Java Emitter Template (JET) package
Install this package if the customization procedure uses a Java Emitter Template (JET) to generate code, for example, service modules and Java classes. JET is an Eclipse-enabled template engine for generating applications based on customizable, model-driven architecture transformations.
- Set up the development environment for creating WebSphere Commerce services
WebSphere Commerce Developer is the development environment used for creating WebSphere Commerce services.
- Set an EMF genmodel to generate 2.2 compatible objects
WebSphere Commerce runs on EMF 2.2, while Rational Application Developer runs on EMF 2.4. A new EMF object created in Rational Application Developer will contain the EMF 2.4 default values. You can setup WebSphere Commerce Developer to generate EMF models that are compatible with WebSphere Commerce. If the pattern is run, these settings are enabled by default. However, if you create a new custom EMF model, these settings are not enabled by default.
- Use a client library
You can use a WebSphere Commerce services client library (for example, MemberFacadeClient) in a standard Java application.
- Create the client library
Creating a new client library involves using the Design Pattern Toolkit and the ComponentProjects design pattern to create the template client code, and then opening and further customizing the generated class.
- Extend the client library
You can extend an existing client library to add more data to the current service request, handle new data in a service response, or add new behavior by building an entirely new service request.
- Deploy the client library
The client library for a WebSphere Commerce service can be deployed in one of four possible environments:
- Test a WebSphere Commerce service
After applying the WebSphere Commerce service module pattern, a MyServiceModule-UnitTest project is created as a place to put JUnit tests for services created. JUnit is a simple and commonly used Java testing framework for the purpose of unit test.
- Externalize WebSphere Commerce services
The default ports for WebSphere Commerce services in the production environment are 8007 for non-SSL and 8006 for SSL. These services use the preview virtual host. This means that by default, the services can be accessed internally, but not externally, unless these ports have been opened by the firewall.
- WebSphere Commerce foundation
The WebSphere Commerce foundation feature adds new groups of services to the WebSphere Commerce Server.
- WebSphere Commerce services error information
When an exception occurs during the processing of a message, the OAGIS convention is to return a well-formed response message, with the error data embedded. The ChangeStatus element is used to store exception data; if the request was completed successfully, this area is not populated. Because only one action per message is supported, there can be only one error per message. For this reason the limitation of one ChangeStatus area per message is reasonable.
- Client library exceptions
Client library exceptions consist of one or more instances of the ClientError object.
- WebSphere Commerce extended XPath notation
WebSphere Commerce uses an extended XPath notation as the query language to identify the parts of the logical model to query. XPath is an industry standard language for addressing parts of an XML document, and the WebSphere Commerce extended XPath notation has some extensions to this standard.
- Java Emitter Template (JET) Component Projects pattern
The release of version 7.5 of the Rational Software Delivery Platform provides users of the Design Pattern Toolkit (DPTK) with equivalent functionality built into the IBM Rational modeling products. The new version of the Rational Software Delivery Platform includes new code-generation technology based on the Eclipse Modeling Framework Technologies Java Emitter Template (JET) open-source project. JET includes many technologies first demonstrated in the Design Pattern Toolkit (DPTK).