Skip to main content
Skip table of contents

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.

Click here to expand...

Select the UML model, in which the file should be imported. The uml source path of the current Builder project will be suggested.
Select an XMI file and click OK.


After a few seconds, the chosen target XMI file will be loaded.

The Builder shows information about the import process in the Messages window.

The imported types are stored in package Data / <OData entities file name>.import.xml.

The UML model needs to be saved to persist the imported entities and packages. If an error occurred during the import, you will be notified by the Importer.

Importing OData Entities into a New UML Model

Wanting to import OData Entities into a new UML model, proceed as follows.

Click here to expand...

Choose the directory, in which the new XMI file should be stored. The uml source path of the current Builder project will be suggested.

Enter a file name for the new UML model or leave the suggested file name, and click OK.

If the file already exists, you will be asked whether you want to overwrite it.

After a few seconds, the new UML model will be opened in MagicDraw.

The Builder shows information about the import process in the Messages window.

The imported types are stored in package Data / <OData entities file name>.import.xml.

The UML model needs to be saved to persist the imported entities and packages. If an error occurred during the import, you will be notified by the Importer.

New UML models that are created by importing WSDL / XSD files are not based on the Bridge template and can be used as a module. You may want to import such models into another UML model that is based on the Bridge template later.

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.

  1. Open the OData import file in <your project folder>/uml/imports, and navigate to the attribute in question.
  2. 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.
  3. Save the import file.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.