Start of Content Area

Function documentation Mass Import for External Definitions  Locate the document in its SAP Library structure

Use

The ES Builder provides a wizard for a mass import of external definitions. You use this wizard to include files in WSDL, XSD, and DTD format from all Windows Explorer logical drives in an import list. The wizard shows a Preview with proposals for names of the external definitions to be created, and analyzes references to other files (only for files in WSDL and XSD format). You can use the wizard to create all external definitions at once in a namespace of the ES Repository.

Prerequisites

The wizard cannot access files that are part of an archive. Unpack all files to a directory first.

The files to be imported must conform to the WSDL, XSD, or DTD standard. The wizard uses the file extension to determine the file type:

File Extension

Category of External Definition

.xsd

XSD

.wsdl

WSDL

.dtd

DTD

(other or none)

WSDL

If the wizard cannot determine the category from the file extension, it assigns the file a corresponding message, which you can call in the preview.

Features

Resolving References (WSDL and XSD)

If you select the Import Referenced Files option during the Select Files step, the wizard recognizes references from WSDL files to XSD files and from XSD files to other XSD files. The wizard determines the referenced file using the schemaLocation attribute and includes it in the import list. The wizard can only determine the referenced file if the reference is to a file in the local file system (absolute or relative).

Messages in the Preview

When creating the import list, the wizard checks whether an external definition can be created for a file in the selected namespace without problems. If there are warnings or errors for the import, you can call these messages in the preview. A message can have the following causes:

      The file cannot be imported or has an unknown format.

      There is already an external definition with the same name in the selected repository namespace of the ES Repository.

      There are several files with the same file name (from different directories) in the import list.

      The references contained in the file cannot be converted to references between the external definitions during import.

The XML files to be imported are usually saved in a directory hierarchy. This hierarchy is lost upon import to the ES Repository because all external definitions are created in one repository namespace. This is the cause of some of the conflicts described above.

The table below provides an overview of messages in the preview and gives an indication of their cause. If the messages can only appear for a particular file type, this is indicated in the table heading.

File Format Messages

No.

Message

Cause

1

File <File Name> could not be identified as WSDL or XML schema; external WSDL definition created for it nevertheless

The file does not have one of the file extensions xsd, wsdl, dtd, or xml and therefore cannot be assigned uniquely to a format.

2

File <File Name> is an XML file; external WSDL category created

The file has the file extension xml. Since files in WSDL or XSD format are also XML files, the wizard created a WSDL file (WSDL files can contain XSD statements).

3

XML schema in file <File Name> could not be imported

The file has the file extension xsd, but could not be imported. The XML schema of the file may be invalid.

Naming Conflict Messages

 

Message

Cause (and Solution)

4

External definition with the name <Name of definition in ES Repository> already exists

The ES Repository already contains an external definition with the same name in the namespace in which the external definition for this file is to be created. The wizard would overwrite this external definition during import.

Check whether the two external definitions are identical. If so, you do not need to import the file. If not, you must import the file under another name; otherwise the wizard overwrites the external definition in the ES Repository.

5

An external definition with the same name <Name of definition in ES Repository> and source <Source> already exists

The ES Repository already contains an external definition with the same name in the namespace in which the external definition for this file is to be created. The same source is specified for the existing external definition (you can therefore assume that another external definition already references this definition).

Check whether the two external definitions are identical. If so, you do not need to import the file. If not, you must import the file under another name (otherwise the wizard overwrites the external definition in the ES Repository) and assign another source to it.

6

Name <File Name> is already in the current import list; name <Name of external definition> generated for it

You have selected two files for import. These files are in different directories and have the same file name. To exclude naming conflicts, the wizard appends a number to the name for the external definition.

Different References to the Same File (WSDL, XSD)

No.

Message

Cause

7

An external definition <extDefName> with a different source <Source> already exists

The ES Repository already contains an external definition with the same name <extDefName> in the namespace in which the external definition for this file is to be created. A different source is specified for the existing external definition (you can therefore assume that another external definition already references this definition).

The import list contains two or more files with different references to an external definition with the name <extDefName>. However, you can only specify one source for each external definition. Change the name of the external definition in the import list. For more information, see the example below.

8

Additional source <Source> to be specified for external definition <extDefName> for the imported file <File Name>

The wizard has already entered a source for the external definition to be created in the import list (file <File Name>) because this definition is referenced by another definition in the import list. Because of a second reference to this definition, the wizard would have to enter another source for this definition, but this is not possible.

One or more files contain different references to the definition <extDefName>, but you can only specify one source for this definition. Import the external definition a second time and specify the references of the other file as the source. For more information, see the example below.

9

This external definition references the external definition <extDefName>; its source <Source> could not be set

This message is the counterpart to message 8. The source of the external definition <extDefName> could not be set because it is already set due to another reference (see message 8).

Example

An XSD file C:\common.xsd is included by the XML files (1) C:\standalone\varTypes.xsd and (2) C:\integrated\local\varTypes.xsd, in each case by a relative reference:

(1) <xsd:import schemaLocation="../common.xsd" />

(2) <xsd:import schemaLocation="../../common.xsd" />

If you import all three files in a mass import, the wizard tries to map these references to references between the external definitions. For this to happen, the external definition common for the file common.xsd must have a source entry as the identifier (Source field in the header data of common). The other two external definitions reference this source entry. However, due to the directory hierarchy, there are two different source entries (once ../common.xsd and once ../../common.xsd). You can solve this conflict by importing common.xsd twice (with a different name each time, for example common0 and common1): During an import you specify ../common.xsd as the source for common0 and ../../common.xsd as the source for common1.

Furthermore, the wizard must create two external definitions with the same name (varTypes) in the same repository namespace. In this example, the wizard would use a suffix to resolve the conflict (varTypes0, varTypes1).

Reference to a File Name in Two Different Directory Paths (WSDL, XSD)

No.

Message

Cause

10

External definition <Name> with the same source <Source> already exists

The ES Repository already contains an external definition with the same source in the namespace in which the external definition <Name> for this file is to be created.

11

External definition <Name> with the same source <Source> imported

The import list already contains another external definition with the same source for the external definition that is to be created for this file.

These two messages relate to the event that two files reference different files using the same relative link, but it is unclear whether the files have the same content.

Example

Let us assume the following directory structure:

(1) c:\types.xsd

(2) c:\RequestMessages\SalesOrder.xsd

(3) c:\ApplicationMessages\types.xsd

(4) c:\ApplicationMessages\ResponseMessages\InvoiceConfirmation.xsd

SalesOrder.xsd from line (2) references types.xsd from line (1). InvoiceConfirmation.xsd from line (4) references types.xsd from line (3). Both references use the same source specification (schemaLocation=“../types.xsd“).

In the event of message 11, the import list contains all files of example ((1)-(4)); message 10 indicates that either files (1) und (2) or files (3) und (4) were imported in an earlier import. In both cases you must check whether the content of file types.xsd from line (1) is the same as the content of file types.xsd from line (3):

      If the content is the same, you only need to import the file types.xsd once. The references from SalesOrder.xsd (2) and InvoiceConfirmation.xsd (4) are correct.

      If the content is different, proceed as follows:

...

                            a.      If not already done in a previous import, first import only one version of types.xsd and the corresponding referencing file, for example (1) and (2).

                            b.      Copy InvoiceConfirmation.xsd (4) and change the reference in the copy, for example to schemaLocation=“ApplicationTypes.xsd“.

                            c.      Import (3) and (4) and assign (3) the source that you entered in the last step of the copy (in this example: ApplicationTypes.xsd).

Activities

...

       1.      To start the mass import, choose Tools   Import External Definitions.

       2.      Follow the wizard’s instructions.

 

 

 

 

 

End of Content Area