on 10-19-2010 11:23 AM
Hi Guru's,
I am working with SAP PI 7.0 and when I upload an XSD to PI I can see the following structure:
<xs:element name="fields">
<xs:complexType>
<xs:attribute name="Field1" type="xs:string" use="required"/>
<xs:attribute name="Field2" type="xs:string" use="required"/>
<xs:attribute name="Field3" type="xs:string"/>
</xs:complexType>
</xs:element>
When I look in the message mapping in the repository I see that field 2 and field 3 has changed position, so in message mapping it's via the following sequence:
<xs:attribute name="Field1" type="xs:string" use="required"/>
<xs:attribute name="Field3" type="xs:string"/>
<xs:attribute name="Field2" type="xs:string" use="required"/>
How can this be?
Best regards,
Guido Koopmann
I discussed this with a developer from SAP some times ago.
When the XSD does not have a "sequence" tag, PI picks up the elements and attributes randomly.
In principle an XML parser should not make a difference, in which order the attributes come.
To avoid this behaviour, you have to add a sequence node:
<xsd:complexType>
<xsd:sequence>
<xs:attribute name="Field1" type="xs:string" use="required"/>
<xs:attribute name="Field2" type="xs:string" use="required"/>
<xs:attribute name="Field3" type="xs:string"/>
</xsd:sequence>
</xsd:complexType>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.