Creating the SDO genmodel file
In this step, you create a genmodel file that is used to generate your new EngravingOrderItemType object.
Procedure
- 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.
- Navigate to the WebServicesRouter/WebContent/component-services/ecore
folder. Name your new genmodel file
MyExtension.genmodel
and click Next. - Select Load from an XML Schema and click Next
- 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.
- 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. - Expand Workspace/WebServicesRouter/WebContent/component-services/ecore then select Order.genmodel, Foundation.genmodel, and Oagis9.genmodel. Click OK.
- Expand all items in the Referenced generator models view. Select all the referenced generator models and click Finish.
- Optional: To verify the .genmodel file and .ecore
file for a component is generated correctly:
- Open the MyExtension.genmodel file from the WebServicesRouter/WebContent/component-services/ecore directory.
- Search for references to
Foundation.genmodel
andOagis9.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:
That is, it must not resemble the following snippet:bundleManifest="false" copyrightFields="false" runtimeVersion="2.2" usedGenPackages="Foundation.genmodel#//datatypes Oagis9.genmodel#//codelists Oagis9.genmodel#//unqualifieddatatypes Oagis9.genmodel#//datatypes">
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">
- Open the .ecore file at the same directory from the WebServicesRouter project.
- Search for references to the
com.ibm.commerce
package, such ascom.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:
That is, it must not resemble the following snippet:eType="ecore:EClass com.ibm.commerce.oagis9.datatypes.ecore#//AcknowledgeType"
eType="ecore:EClass ../../Foundation-DataObjects/ecore/com.ibm.commerce.oagis9.datatypes.ecore#//AcknowledgeType"