Creating the SDO genmodel file

In this step, you create a genmodel file that is used to generate your new EngravingOrderItemType object.

Procedure

  1. To create the EMF genmodel, click MyExtensionType.xsd in the Enterprise Explorer view, then select New then Other. Check the Show All Wizards box and select Eclipse Modeling Framework >EMF Models. Click Next.
  2. Navigate to the WebServicesRouter/WebContent/component-services/ecore folder. Name your new genmodel file MyExtension.genmodel and click Next.
  3. Select Load from an XML Schema and click Next
  4. Click Browse Workspace and select the list of XSD schemas to include in the model. Go to your message BOD, in the Components folder and select MyExtenstionType.xsd. Click OK then Next.
  5. Select the data types check box for com.mycompany.commerce.order.facade.datatypes. Then, click the Browse button to add references to the existing genmodel files.
  6. Expand Workspace/WebServicesRouter/WebContent/component-services/ecore then select Order.genmodel, Foundation.genmodel, and Oagis9.genmodel. Click OK.
  7. Expand all items in the Referenced generator models view. Select all the referenced generator models and click Finish.
  8. Optional: To verify the .genmodel file and .ecore file for a component is generated correctly:
    1. Open the MyExtension.genmodel file from the WebServicesRouter/WebContent/component-services/ecore directory.
    2. Search for references to Foundation.genmodel and Oagis9.genmodel and ensure that they are not referring to a relative location on the file system.
      For example, the correct referencing must resemble the following snippet:
      
      bundleManifest="false" copyrightFields="false" runtimeVersion="2.2"
      usedGenPackages="Foundation.genmodel#//datatypes 
      Oagis9.genmodel#//codelists 
      Oagis9.genmodel#//unqualifieddatatypes 
      Oagis9.genmodel#//datatypes"> 
      
      That is, it must not resemble the following snippet:
      
      bundleManifest="false"
      usedGenPackages="../../Foundation-DataObjects/ecore/Foundation.genmodel#//datatypes 
      ../../Foundation-DataObjects/ecore/Oagis9.genmodel#//codelists 
      ../../Foundation-DataObjects/ecore/Oagis9.genmodel#//unqualifieddatatypes 
      ../../Foundation-DataObjects/ecore/Oagis9.genmodel#//datatypes"> 
      
    3. Open the .ecore file at the same directory from the WebServicesRouter project.
    4. Search for references to the com.ibm.commerce package, such as com.ibm.commerce.oagis9.datatypes.ecore and ensure that they are not referring to a relative location on the file system.
      For example, the correct referencing must resemble the following snippet:
      
      eType="ecore:EClass com.ibm.commerce.oagis9.datatypes.ecore#//AcknowledgeType" 
      
      That is, it must not resemble the following snippet:
      
      eType="ecore:EClass ../../Foundation-DataObjects/ecore/com.ibm.commerce.oagis9.datatypes.ecore#//AcknowledgeType"