Show TOC

Procedure documentationImporting WSDL and XSD Files Locate this document in the navigation structure

 

You can import service interface definitions or XSD documents in your application model and compose a new service or simplify the imported service interface. Your application model does not directly use the WSDL and XSD files that you import and are contained in your project. The documents are first imported into the Enterprise Service Modeling (ESM) repository, which saves the imported data in its own proprietary format in the rep/wsdl folder of your project. The repository is seamlessly integrated in your project.

Note Note

The import in the ESM repository occurs during project build. If the auto-build option is switched on, the import happens in the background. To activate the option, go to   Project   Build Automatically  .

End of the note.

When you import WSDL document in your project, a conflict may occur if an interface, defined in the WSDL had been already imported in ESM by another document and the two definitions are different. The difference may be in the number of operations, in one or more operations’ input, output or fault message definitions, and so on. Such two documents cannot exist in the repository at the same time. Note that the conflicting interface may be defined not in the currently imported document, but in a document referenced by it because when a document is imported, all referenced (imported and included) documents are also imported.

If such a conflict occurs, a dialog prompts you to choose whether to continue with the import or cancel it. If the interface you are trying to import is a newer version of the existing one, you may continue with the import. The import thus acts as reimport of an existing document, so as much information as possible will be preserved from the old interface definition. However, all documents that refer to the old interface will be automatically deleted from the ESM repository. The WSDL files are not be deleted from the file system, unless you select Delete documents from the file system checkbox. Note that the WSDL files are visible in your project, but have a warning marker.

If you need to use both definitions of this interface, choose No and import the current WSDL in another project. Note that the WSDL appears in your project, but with an error marker.

Example Example

You have the following WSDL documents in your project:

  • A.wsdl – defines port type “MyInterface”

  • B.wsdl – defines bindings, imports A.wsdl

  • C.wsdl – defines service, imports B.wsdl

You want to import D.wsdl, which defines port type MyInterface, but its definition is different from the definition in A.wsdl because it contains one more operation. If you choose to continue, A.wsdl, B.wsdl, and C.wsdl are deleted from your project and D.wsdl is imported. Since the new version of the interface just adds one more operation, all the existing data is kept and a new operation is added. B.wsdl and C.wsdl need to be deleted, because by reimporting the interface they may become invalid.

End of the example.

When you import or reimport an XSD file in the repository, it might happen that one and the same entity (having the same qualified name), has a different definition in the document that you are trying to import, compared to the definition already existing in the repository and defined by other documents. Such different definitions of the same entity are not allowed in the repository, because of the qualified name uniqueness concept. If such a conflict occurs, in the dialog that appears you can choose one of the following options:

  • Choose the Update Files pushbutton - the entity definition in the document you are trying to import overrides the old entity definition both in the repository and in the files of the already imported documents. The new document will be imported. Use this option with caution, because it might have severe impact on runtime. Choose this option only if you are sure that all existing services, containing this entity have changed, and use the new entity definition. If you are not sure, get the latest versions of these documents, reimport them and if you still get this conflict - reject the import.

    Caution Caution

    A conflict may occur in case you have an XSD file imported in ESM and try to import a WSDL file with multiple schemas. For example, the imported schema is in a file A.xsd and defines schema with target namespace "http://a". The WSDL is in a file W.wsdl and defines two inline schemas for namespaces "http://a" and "http://b". Now, if the conflicting type, belonging to namespace "http://a" , in the WSDL refers entity from namespace "http://b", an import must be added to A.xsd for namespace "http://b". This conflict cannot be resolved automatically because either there is no schema file for namespace “http://b” or there is more than one.

    To resolve the conflict, open the conflicting schema file(s), in this case A.xsd, and add the necessary imports for all required namespaces. This could require creation of the necessary schema files (in this case for example B.xsd) if there are no suitable ones existing. Also make sure that you have added all transitive dependencies (for example the referred entity in namespace "http://b" could refer another entity in "http://c", and so on. Then import/reimport these changes and try again to import the WSDL file.

    End of the caution.
  • Choose the Reject pushbutton - the document that you are trying to import is not imported in the repository. If you still want to use this document you must import it into another project.

You can see all the documents that define a conflicting entity by choosing the Show/Hide Affected Schemas pushbutton, located in the top right corner of the compare dialog.

If you want to use a modified service interface or XSD file, you can reimport it in your project. For more information, see Reimporting Modified WSDL and XSD Files.

Procedure

Importing WSDL Files
  1. In the Service Composer perspective of SAP NetWeaver Developer Studio, navigate to   Service Composition   Service Interfaces  .

  2. From the context menu, choose Import WSDL... Choose the location from where you want to import the WSDL file. When ready, choose Next. For more information about the information required for each option, see Importing WSDL Documents in the SAP NetWeaver Developer Studio.

  3. (Optional) Choose an existing Service Group for the configuration of the imported Web service or create a new one. Choose Next. For more information about using a service reference or service group in your composite application, see Creating Service Groups.

  4. Choose Finish.

Importing XSD Files
  1. In the Service Composer perspective of SAP NetWeaver Developer Studio, navigate to   Service Composition   Data Types  .

  2. In the context menu of the XSD Files folder, choose Import XSD....

  3. Choose the Browse pushbutton to define an output folder for the XSD source file. Choose the OK pushbutton.

    We recommend that you select the src\wsdl folder in your project for an output folder.

  4. Select Remote Location / File System from the Available XSD sources and choose the Next pushbutton.

  5. Select an XSD file to import.

    To do that, choose one of the following options:

    • Choose the Browse pushbutton and navigate through the file system to select the XSD file you want to import.

    • Enter a URL to import the XSD file from.

  6. Choose the Finish pushbutton.

More Information

For more information about the search capabilities you can use in the Search Console, see Browsing Services in Search Console.