cancel
Showing results for 
Search instead for 
Did you mean: 

Importing XSD Referencing each other using SAP PI 7.0

Former Member
0 Kudos

Hello Experts,

I have an requirement wherein I have to import an XSD which inturn reference multiple other XSDs.I am using SAP PI 7.0

I tried importing XSD by zipping it using external definition but it doesnt work..Any idea whether is it possible to import XSD referncing each other using SAP PI 7.0 .

Also i cant copy XSD which have been refered in Main XSD to make it an single XSD.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

turmoll
Active Contributor
0 Kudos

Hello,

Assuming you have parent schema (parent.xsd) that refers to child schema (child.xsd).

Inside of the parent schema (parent.xsd) you have include statement:
"<xs:include schemaLocation="child.xsd"/>".

Assume, you have created two sap pi external definition objects XI_parent and XI_child that refers to aforementioned schemas.

All you need to do is in XI_child object in field "Source" put "child.xsd". That will make XI_parent object aware of "child.xsd" represented by XI_child (External References tab).

Regards,

Jakub Turminski

Former Member
0 Kudos

Hi Vikas,

Please remember the primary rule: xsd:import and xsd:include are not valid statements in External Definition which is used in PI. If these statements are present then the structure will not be correctly popoulated and its colour will be red.

In these scenarios, you need a flat xsd file with all the references in that single file. Need to just copy paste the other imports/includes.

Cheers,

Souvik

prateek
Active Contributor
0 Kudos

>>I tried importing XSD by zipping it using external definition

How coud you import zip file under External Definition? Try importing individual XSDs. Import the child xsd first and then the parent xsd.

>>Also i cant copy XSD which have been refered in Main XSD to make it an single XSD.

You cant just copy paste. You should use some tools like altova to perform this.

Regards,

Prateek Raj Srivastava

Former Member
0 Kudos

Hi Prateek,

I tried importing Child XSD first and then parent XSD,but how will i collate these as 1 single XSD IN XI.

There are more than 50 such Child XSD,so even collating them using XML Spy tools is complex for me.

In SAP PI 7.1 we have an option of referencing XSD.Same feature do we have it PI 7.0

Thanks

shweta_walaskar2
Contributor
0 Kudos

Hi Vikas,

After this import,please navigate to External references Tab.Here you can see two columns: Source and Name.

Under Source,you should be able to see referenced XSDs(either names alone or names with complete path)

You need to make sure that Name column needs to be populated for all these entries.

In order to populate this,you need to copy this XSD name (or name with path) under source section(below Filename in XSD) in corresponding XSD External definition.

Please let us know if you can resolve these references.

Thanks and Best Regards,

Shweta