Generating the SDOs for the TutorialStore noun

In this step, you generate the data objects that are required for implementing the logical data model of your TutorialStore noun, which is defined in the TutorialStore.xsd file.

About this task

Before you generate the data objects, you need to set up the predefined WebSphere Commerce type constructs, and to update the JET-generated TutorialStore.xsd template with your own noun definition.

After you update the XSD definition file, your projects can generate the data objects for your TutorialStore noun. In Java, the data objects that represent the TutorialStore noun are service data objects (SDOs) and are stored in the TutorialStore-DataObjects project. These data objects are generated directly from the TutorialStore noun by using the Eclipse Modeling Framework (EMF).
Remember: You must have the Eclipse Modeling Framework (EMF) capability that is enabled in WebSphere Commerce Developer to complete this step of the tutorial.

Procedure

  1. Set up the predefined WebSphere Commerce type constructs, and update the JET-generated TutorialStore.xsd template with your own noun definition:
    1. In the Enterprise Explorer view, go to SOITutorialStore-DataObjects/xsd/OAGIS/9.0/Overlays/MyCompany/Commerce/Resources/Nouns.
    2. Open the TutorialStore.xsd file for editing.
    3. Replace the generated content with the contents of the TutorialStore.xsd that is in the TutorialStore.zip file that you downloaded from the tutorial prerequisites section.
    4. Save and close the file.
      Note: You can ignore the validation error messages for now. These errors are resolved later in the tutorial.
  2. Generate the data objects for your TutorialStore noun:
    1. Open the SOITutorialStore-DataObjects\ecore folder.
    2. Right-click SOITutorialStore.genmodel and select Reload.
    3. Select XML Schema and click Next.
    4. Click Next again and click Finish.
    5. Open SOITutorialStore.genmodel.
    6. Right-click the SOITutorialStore element under the SOITutorialStore root and select Generate Model Code. The TutorialStore-DataObjects code generates.

      Generate Model Code selection

    7. Verify that the TutorialStore-DataObjects project has no compilation errors.