Skip to main content
Skip table of contents

Importing WSDL or XSD

You can import a WSDL or XML Schema file (XSD) directly from a file or via a URL. The WSDL / XSD import rules are described in detail in Import - Export Mechanisms.

With Builder 7.5.0 we changed the output of the Importer in a way that no package Elements will be generated to the Containment tree anymore. This package only contained generalizations of the imported types and sometimes resulted to duplicate classes.

The Importer will nevertheless re-import older imports the old way. If you want to re-import and get the new Importer output, remove the import file from your filesystem (<your Builder project>/uml/imports.<filename>.import) before starting the Importer.
This will result in orphaned proxies in you model. You can resolve them with MagicDraw (see Troubleshooting the Builder > Model Contains Orphaned Proxies).

To import a WSDL or XSD file, select Import > WSDL / XSD from the Model Compiler menu.

Importing a WSDL / XSD File

Navigate to the file, select it, and click OK.

The selected file can be imported into either an existing or a new UML model.
Select whether you want the importer to generate one UML module per XML namespace or per XML schema file.

Set option Ignore order of attributes in sequence types if you want to set the isOrdered tagged value on the imported class to false.

Setting isOrdered to false if a WSDL comes with <xsd:sequence> does not match the WSDL standard, but in some scenarios it may be useful.

You can cancel the import by clicking Cancel.

Importing WSDL / XSD into an Existing UML Model

Wanting to import a WSDL file 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.

If the current Builder project does only contain one UML model, the importer automatically selects this model without showing the file chooser dialog.

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

Having imported an XML Schema file (XSD), ...

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

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

Having imported a WSDL file, ...

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

The imported data is stored in the package Data / <WSDL file name>.wsdl.

Creation of aliases and alias templates: During the first import into an existing model, aliases and alias templates are created. When a file is re-imported, the alias templates are changed and missing aliases are recreated. Existing aliases remain unchanged.

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. Refer to Errors Importing a WSDL / XSD File for more information.

Importing WSDL / XSD into a New UML Model

Wanting to import a WSDL file 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 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.

Having imported an XML Schema file (XSD), ...

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

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

Having imported a WSDL file, ...

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

The imported data is stored in the package Data / <WSDL file name>.wsdl.

Creation of aliases and alias templates: During the import into a new model, aliases and alias templates are created.

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. Refer to Errors Importing a WSDL / XSD File for more information.

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.

Importing a WSDL / XSD from URL

To import a WSDL or XSD file, select Import > WSDL / XSD from the Model Compiler menu.

Enter a complete URL of the WSDL you want to import.

For instance, check out xMethods, where you will find publicly available Web Services (http://www.xmethods.com).

For instance, enter the URL of a WSDL that defines a Web Service providing a currency exchange service: http://www.xmethods.net/sd/2001/ CurrencyExchangeService.wsdl.

Alternatively, you could also import a WSDL of an xUML service deployed to the Bridge in order to integrate it as SOAP backend in your model.

The selected file can be imported into either an existing or a new UML model.

The import process may also be canceled clicking Cancel.

Importing WSDL / XSD into an Existing UML Model

Wanting to import a WSDL file 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.

If the current Builder project does only contain one UML model, the importer automatically selects this model without showing the file chooser dialog.

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

Having imported an XML Schema file (XSD), ...

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

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

Having imported a WSDL file, ...

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

The imported data is stored in the package Data / <WSDL file name>.wsdl.

Creation of aliases and alias templates: During the first import into an existing model, aliases and alias templates are created. When a file is re-imported, the alias templates are changed and missing aliases are recreated. Existing aliases remain unchanged.

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. Refer to Errors Importing a WSDL / XSD File for more information.

Importing WSDL / XSD into a New UML Model

Wanting to import a WSDL file 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 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.

Having imported an XML Schema file (XSD), ...

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

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

Having imported a WSDL file, ...

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

The imported data is stored in the package Data / <WSDL file name>.wsdl.

Creation of aliases and alias templates: During the import into a new model, aliases and alias templates are created.

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. Refer to Errors Importing a WSDL / XSD File for more information.

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.

JavaScript errors detected

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

If this problem persists, please contact our support.