Importing OData Entities and Services
Bridge 7 You can import an OData CSDL file (.edmx) describing an OData REST interface directly from a file or via a URL. The importer will generate the data (entities and types) and service elements to your UML model.
The OData entities import rules are described in detail in OData Import Rules.
After the import, you can call the OData REST service using the xUML REST Adapter.
To import OData metadata to your Builder project, select Import > OData from the xUML Compiler menu.
Enter a URL to the OData metadata file or select a file from disk:
The selected file can be imported into either an existing or a new UML model. Import to a new model will create a ready to use test model. Create a component diagram and test the service call.
By selecting Only import entities and types you can prevent the importer from importing the service interface structure to your service. This can be helpful with big interface files containing thousands of classes, if the importer is working very long on the import, and if you can do with the data structures only. You can still cancel the import by clicking Cancel.
Importing OData Entities into an Existing UML Model
Wanting to import OData Entities into an existing UML model, proceed as follows.
Importing OData Entities into a New UML Model
Wanting to import OData Entities into a new UML model, proceed as follows.
Non-compliant Attribute Names
It may that attribute names of the imported OData structure do not comply to the rules defined on Syntax Scheme of the xUML Action Language. In that case, you may want to use an internal name for these attributes so you do not need to escape them every time they are used.
- Open the OData import file in
<your project folder>/uml/imports
, and navigate to the attribute in question. - Open the specification dialog of the attribute and
- apply stereotype <<E2EAttribute>>
- set tag External Name to the OData name
- change the property name to a more appropriate name.
- Save the import file.
Related Pages: