Tutorial: Creating a WebSphere Commerce service module > < Previous | Next >
Generating the TutorialStore service module projects
In this step you use the ComponentProjects Design Pattern Toolkit (DPTK) to generate the base code for your TutorialStore component.
- Start WebSphere Commerce Developer.
- Open the J2EE perspective.
- Create the application definition file to create the base code for the TutorialStore SOI service module.
- Expand the Other Projects > ComponentProject > components folder.
- Right-click the components folder and select New > Other > Simple > File. Click Next.
- In the file name field type tutorialstore.appdef.
- Click Finish.
- Double-click the tutorialStore.appdef file to open it.
- Paste the following application definition into the file
<commerce-component name="TutorialStore" company="MyCompany" packagenameprefix="com.mycompany.commerce" namespace="http://www.mycompany.com/xmlns/prod/commerce/9" nlsprefix="mycompany" type="SOI"> <noun name="TutorialStore" get="true" process="true" change="false" sync="false"/> </commerce-component>the definition indicates the name of the noun (TutorialStore) and the verbs that are enabled for the pattern (Get and Process, but not Change or Sync). This file determines the assets and code to be generated for you.
- Save the file.
- Right-click tutorialStore.appdef and select Apply Pattern.
- Select WebsphereCommerce Component Projects.
![]()
- Click OK. The pattern is applied. Verify that the following projects are created, by switching to the Navigator view:
- TutorialStore-Client
- TutorialStore-DataObjects
- TutorialStore-Server
- TutorialStore-UnitTests
- TutorialStoreServicesHTTPInterface
- TutorialStoreServicesJMSInterface
Build errors will show up in the projects at this stage because the TutorialStore data objects have not yet been generated from the TutorialStore noun. Continue the tutorial to generate these objects and resolve the build errors. < Previous | Next >