cancel
Showing results for 
Search instead for 
Did you mean: 

"Import" element allowed in XSD?

Former Member
0 Kudos

Hi Guys,

I wonder if it is allowed to use the "import" element in an XSD scheme (imported as external definition in the repository).

I created one external definition with the main scheme and one external definition with the referenced scheme. I referenced with the file name and also tried to reference with the external definition name but for some reason the system complaints.

Any clue is appreciated...

Karsten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Karsten,

To put it short, as far as i know this doesn't work in PI Versions prior to 7.1.

In Versions before PI 7.1 (SAP XI 3.0 - SAP PI 7.0) you have to merge imports or includes into one XML Schema to use it as external defintion.

In PI 7.1 you can use imports, the upload theme will ask you if you want to use the contained imports and upload them, too.

But it just work with imports in the same "context", if you use urls to other hosts or something alike it doesn't work.

With best regards

Sebastian

Former Member
0 Kudos

Thank's Sebastian!!

Do you know if there is a confirmation to your thesis in help.sap or wherever?

Thank's

Karsten

henrique_pinto
Active Contributor
0 Kudos

> To put it short, as far as i know this doesn't work in PI Versions prior to 7.1.

> In Versions before PI 7.1 (SAP XI 3.0 - SAP PI 7.0) you have to merge imports or includes into one XML Schema to use it as external defintion.

Wrong information.

It works perfectly. You just have to maintain the "source" field of the referenced external definition with the same content inside the location attribute of the referencing external definition (be it an import or an include).

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

You re right, i am wrong on that one

I remember now, we didn't use it, as we had problems with a lot of different namespaces in our includes, which seem to be no problem in 7.1, ok that's another topic.

Sorry for the wrong info Karsten, my bad

Check here for what Henrique explained :

http://help.sap.com/saphelp_nw70/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

regards

Sebastian

Former Member
0 Kudos

Hi Henrique,

Thank's for that very helpful information! So finally YOU solved my problem

I found information about external definition on help.sap.com (http://help.sap.com/saphelp_nw70/helpdata/EN/26/9e97b0f525d743882936c2d6f375c7/frameset.htm) but I'm still confused.

Which value for the "messages" field for the referencing xsd and which value for the referenced xsd?

Which value in the source fields? Is any value allowed as long as it is the same for both xsd's?

Do you have an example?

Thank's a lot!

Karsten

Former Member
0 Kudos

Sebastian,

Thank's anyway. I found the chapter about external definition (http://help.sap.com/saphelp_nw70/helpdata/EN/26/9e97b0f525d743882936c2d6f375c7/frameset.htm) and it describes the procedure as explained by Henrique.

I'm still not shure about the values for the "messages" and "source" fields for the referencing and the referenced xsd but I'm quite shure that someone will have an example or any other clue for that too The explanation on help.sap.com confused me somehow...

Greetz

Karsten

henrique_pinto
Active Contributor
0 Kudos

Sebastian,

the Messages tab is filled automatically once you import the document. You don't have to fill anything in it.

For the reference to work, you just have to fill the source field of the referenced XSD. For example, suppose you have 2 XSDs, A & B, and A import B. Suppose the import tag in A is like this:

><xsd:include location="..\folder\schemas\B.xsd"/>

You have to put the location (the part inside the quotes, in bold) in the source field of external definition for B. It will work as an alias for B xsd, and since A looks for this alias, it will be able to find B.

Regards,

Henrique.

Former Member
0 Kudos

That's it!

Thank's for ur help!!

//Karsten

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

When you are using External definition "Import" element is not accepted in XI.You can use the same in XSLT Mapping but not in External Definition

Thanks,

Bhargav

Note:Award Points if found useful

Former Member
0 Kudos

Hi

if u want to import as an external definition then it will be ur xsd file .

to import the xsd file in the XI in the namesapce >expand the tree interfaces objects->right click on the external definition>clivk on New>give any name and click on create provide the xsd file form the desktop and then save and activate.

the file will be imported as external definition.

Thanks

Rinku

Former Member
0 Kudos

Hi Rinku,

How to import an XSD scheme as external definition is not the issue.

I want to know if the "import" element is supported. Looks like this:

xs:import namespace="..." schemaLocation="xxx.xsd"

Like an include you know. Of course the referenced scheme (xxx.xsd) has to be imported as well. But is "import" allowed within XI??

Thanks

Karsten