Tutorials > Program model > Web services > Create a WebSphere Commerce service module (SOI)
Tutorial: Creating the Process TutorialStore service
In this tutorial we will follow the development of a sample service module, TutorialStore, based on the concept of a Store in WebSphere Commerce version 7. The services provided by the tutorial store will be Get and Process. In this tutorial part, the Process service initiates a business process for the tutorial store
Since this is an SOI tutorial, the pattern will create a service module that provides service-oriented integration into the existing controller commands, access beans, and EJBs.
Learning objectives
The Process service initiates a business process for the tutorial store. For this tutorial we will demonstrate how to reuse existing WebSphere Commerce commands for the following business process actions.
- Open a store (com.ibm.commerce.store.commands.StoreOpenCmd)
- Close a store (com.ibm.commerce.store.commands.StoreCloseCmd)
For the purpose of this tutorial, the definition of the TutorialStore contains the information listed in the table below. The table shows the access profile that includes this information for the preceding XPath expressions.
Data Description Applicable Access Profiles Store identifier information Information to uniquely identify the store. Summary, Detail, All Store description Description information about the store. Detail, All State Whether the store is "Open", "Closed" or "Suspended." Detail, All Store category The category of the store, such as B2C or B2B. Detail, All Inventory system The inventory system used by the store. Detail, All Store relationship The store directory that contains the file resources associated with the store. Detail, All Supported languages The languages supported by the store. All Support currencies The currencies supported by the store. All Fulfillment center The fulfillment center associated with the store. All
Time required
Expect this tutorial to take 2 hours to complete.
Audience
This tutorial is intended for WebSphere Commerce developers who are responsible for creating and customizing WebSphere Commerce services.
Prerequisites
Before beginning this tutorial ensure that you have fulfilled the following prerequisites:
- Completed the Create the Get TutorialStore service tutorial.
Prerequisite knowledge
To complete this tutorial you should be familiar with the following terms and concepts:
- WebSphere Commerce service module
- Eclipse plug-ins
- The Java programming language
- Rational Application Developer
- How to import code into Rational Application Developer
- XML and related XML technologies such as XSD
- Register commands with WebSphere Commerce
- Run SQL scripts against a relational database
Lessons in this tutorial
- Modify the TutorialStore service module projects
In this step, you reuse the Java Emitter Template (JET) to modify the base code for the Get TutorialStore component and introduce the support for Process. Your existing Get TutorialStore service logic remains unchanged.
- Regenerate the SDOs for the TutorialStore noun
In this step, you generate the data objects required for implementing the logical data model of the TutorialStore noun, which is defined in the TutorialStore.xsd file.
- Implement the component facade
In this step, you implement the code logic in the component facade for handling the ProcessTutorialStore requests, in addition to implementing the code for generating AcknowledgeTutorialStore responses.
- Implement the client library
In this step, you add convenience methods that hide the complexity of creating the different GetTutorialStore requests.
- Deploy and validating the TutorialStore service module with JUnit
In this step, you are going to use the generated JUnit test class, TutorialStoreFacadeClientTest, to validate the TutorialStore service module.
- Create the Process TutorialStore service summary
This section summarizes the tutorial.