cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to reference XSD with in a XSD strucutre in PI?

Former Member
0 Kudos

Hi Experts,

I have a XSD in which one field is referencing another xsd. I impoted referenced xsd and the main xsd as External Defination but I am unable to see/get the all fields from the reference xsd. where as in XMLSPY I am able to see the entire structure with out any problem.

Can any one please give your input to solve this problem.

Thanks

Rajeev.

Accepted Solutions (0)

Answers (4)

Answers (4)

madanmohan_agrawal
Contributor
0 Kudos

Hi Rajeev,

The problem is in reference. I mean after importing both XSDs as External Definition(ED), you need to refer the ED of referenced XSD in the "Source" field of ED of main XSD.

Ex,

XSD1 --> ED1

XSD2 --> ED2

Go to ED2 --> Source --> Mention name of ED1 --> save and acivate --> then it will work.

Hope it wil help.

Br,

Madan Agrawal

sunil_singh13
Active Contributor
0 Kudos

Hi Rajeev,

Yes it is possible to refer another XSD from one XSD. In this case the referd XSD will come as href in Payload.

You must be using SOAP Adapter.

The problem is SOAP does not support more than one body child. If a SOAP message with several body childs arrive, then only the first child is considered, all other body childs are ignored.

this is happening in your case.

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Guys,

Yes I imported the external references first and I can see all of them in external tad.

I used import and include statements in the main xsd. I am just wondering where would be the problem.

Regards,

Rajeev.

Former Member
0 Kudos

Also fill the field Source in the external definition with the name of the file, so that the second file referencing this XSD can find it.

Kind regards,

Koen

Former Member
0 Kudos

Hi,

The same XSD is working fine with out any changes in any of the XSD in xmlspy but when I import main and all referenced xsd's in PI I am unable to see all fileds specailly of referencing.

Thanks

Rajeev

prateek
Active Contributor
0 Kudos

You shouldn't use import statement. Just use include statement.

Regards,

Prateek

Former Member
0 Kudos

Hi,

How come its working in xml spy with import statement as well? any way I would like to edit the xsd, is it possible to edit in PI after improting?? If not I need to edit in xml spy and reimport in PI?

Thnaks

Former Member
0 Kudos

Hi,

As Koen de Vries mentioned above,

IN Ext Def --> Source

provide the "Source" field correctly in the corresponding XSDs, this is the field which is referenced in other XSDs. (this has to be the actual file name "abc.xsd"). all XSDs should have this.

we had similar issue & the above is the solution.

Regards

Vishnu

madanmohan_agrawal
Contributor
0 Kudos

No, its not possible to edit the XSD content after imported in PI.

but as I said earlier you can have the full structure (by referencing the ED1 in source field of ED2). Have you tried that?

Br,

Madan Agrawal

Former Member
0 Kudos

HI,

Here is the XSD strucutres:

Main XSD:

<xsd:element name="MaterialDefinition" type="MaterialDefinitionType" minOccurs="0" maxOccurs="unbounded" />

<xsd:complexType name="MaterialDefinitionType">

<xsd:sequence>

<xsd:element name="ID" type="IDType" />

<xsd:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="MaterialDefinitionProperty" type="MaterialDefinitionPropertyType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="MaterialClassID" type="MaterialClassIDType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="MaterialLotID" type="MaterialLotIDType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="Any" type="AnyMaterialDefinitionExtensionType" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="AnyMaterialDefinitionExtensionType">

<xsd:sequence>

<xsd:element ref="sit:MaterialDefinitionExtension" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="MaterialDefinitionPropertyType">

<xsd:sequence>

<xsd:element name="ID" type="IDType" />

<xsd:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="Value" type="ValueType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="QAMaterialTestSpecificationID" type="QAMaterialTestSpecificationIDType" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="Any" type="sit:MaterialDefinitionPropertyExtensionType" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

Referenced XSD is as follow:

<xsd:element name="MaterialDefinitionExtension" type="MaterialDefinitionExtensionType">

<xsd:annotation>

<xsd:documentation>

Is the extension for b2mml:MaterialDefinition. This element can be used only

as subelement of the b2mml:MaterialDefinition/b2mml:Any element

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:complexType name="MaterialDefinitionExtensionType">

<xsd:sequence>

<xsd:element name="Label" type="b2mml:NameType" minOccurs="0">

<xsd:annotation>

<xsd:documentation>

It contains the material definition localized label

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element name="Comment" type="b2mml:DescriptionType" minOccurs="0" />

<xsd:element name="Version" type="b2mml:VersionType" minOccurs="0" />

<xsd:element name="Status" type="xsd:string" minOccurs="0" />

<xsd:element name="UnitOfMeasure" type="b2mml:UnitOfMeasureType" minOccurs="0" />

<xsd:element name="LotUnitOfMeasure" type="b2mml:UnitOfMeasureType" minOccurs="0">

<xsd:annotation>

<xsd:documentation>

Is the default Unit of measure used for Lots belonging to this Materisl Definition.

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element name="SublotUnitOfMeasure" type="b2mml:UnitOfMeasureType" minOccurs="0">

<xsd:annotation>

<xsd:documentation>

Is the default Unit of measure used for Sublots belonging to this Materisl Definition.

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element name="MaterialDefinitionThreshold" type="ThresholdType" minOccurs="0" maxOccurs="unbounded">

<xsd:annotation>

<xsd:documentation>

It contains the material definition thresholds

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element name="Validity" type="ValidityType" minOccurs="0">

<xsd:annotation>

<xsd:documentation>

Specifies the validity interval of this lot.

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:element name="MaterialType" type="xsd:string" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:element name="MaterialDefinitionPropertyExtension" type="MaterialDefinitionPropertyExtensionType">

<xsd:annotation>

<xsd:documentation>

Is the extension for b2mml:MaterialDefinitionProperty. This element can be used only as subelement of the b2mml:MaterialDefinitionProperty/b2mml:Any element

</xsd:documentation>

</xsd:annotation>

</xsd:element>

<xsd:complexType name="MaterialDefinitionPropertyExtensionType">

<xsd:sequence>

<xsd:element name="Label" type="b2mml:NameType" minOccurs="0" />

<xsd:element name="Threshold" type="ThresholdType" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

I see the source and target has the same names mentioned. Please advise how can I slove this problem of getting fields of referenced xsd?

Thanks alot

Rajeev.

Former Member
0 Kudos

Hi,

this has nothing to do with your XSDs..

when you imported them as External definition in IR..

For all XSDs, you are importing, you have to fill the field called "Source" in the IR (ext def object) in XI.

this is in the same screen where you import your XSD (just below the field "File")

this shud have the value as i mentioned above in my post.

then you can see all the referencing XSDs.

Regards

Vishnu

madanmohan_agrawal
Contributor
0 Kudos

Hi Rajeev,

Follow the points.

1. Name the Main XSD as MaterialDefinition.xsd and import it as ED, named ED_MaterialDefinition

2. Name the referenced XSD as MaterialDefinitionExtension.xsd and import it as ED, named ED_MaterialDefinitionExtension

3. Open ED_MaterialDefinitionExtension and go to EDIT mode

4. In EDIT mode, go to "SOURCE" field and enter the following information " MaterialDefinition.xsd"

5. Save and Activate

To check,

6. Open ED_MaterialDefinition and go to reference tab, there you can find the referenced message

Br,

Madan Agrawal

Former Member
0 Kudos

Hi,

I already see the references xsd in the references tad of External Defination in PI. I also followed your points but still I am unable to get the required fields in the main xsd.

Thanks

madanmohan_agrawal
Contributor
0 Kudos

Hi rajeev,

where are you looking for the referenced fields??in ED....then its not the place.

Go to Message Mapping --> Choose the ED of Main XSD (first remove the old one if exist) and then you can find all your required fields.

Br,

Madan Agrawal

Former Member
0 Kudos

Hi,

I am looking the xsd structure in Message Mapping and I dont see the fields which are referenced from another xsd.

Solved finally.

Many thanks fopr your input.

Thanks

Edited by: rajeev raj on Feb 12, 2009 5:05 PM

Former Member
0 Kudos

Hi,

First import file1 under external definition. Now use the following in file2

<xsd:include schemaLocation="file1.xsd"/>

Regards,

Sarvesh

prateek
Active Contributor
0 Kudos

In the XSD, while clicking on External reference, could you see the other xsd? First you should import the referenced xsd and then the main one.

Are you using import statement or an incluede statement in xsd?

Regard,

Prateek