cancel
Showing results for 
Search instead for 
Did you mean: 

Attribute Order

Former Member
0 Kudos

Hi,

I have a data type that amongst other things has an element which has three attributes. Those attributes look correct when I view the data type. However, in the message mapping the attribute order has changed. Surely the attributes should be in the order defined in the data type. I hope the example below helps

DATATYPE

..Element1

.....Attribute1

.....Attribute2

.....Attribute3

MAPPYING

..Element1

.....Attribute1

.....Attribute3

.....Attribute2

This is causing problems as the order of the attributes in the XML output to the client is different to that agreed. I would appreciate your help with this.

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

Hi,

Check if the message type that was used in the mapping is the same one that has the attributes in correct order.

May be there is another message type that has the wrong order of the elements within.

Regards,

Ravi

Former Member
0 Kudos

Hi, that is a good point. However, I accessed the data type by clicking on the data type in the message mapping. This is also quite a new XI system and there aren't any data types in XI with a similar name.

former_member181962
Active Contributor
0 Kudos

HI Robert,

Did you try unassigning the current message type and reassigning the correct one?

Regards,

Ravi

Former Member
0 Kudos

Sorry, I didn't make myself clear. This is the correct data type - there aren't any others with the same name in the system - I know it's right. What I don't understand is why the order appears to be different when in the message mapping.

former_member181962
Active Contributor
0 Kudos

HI Robert,

There is possibility to duplicate an element and to delete some element when using a message type in the messaping.

Check if someone altered the order of the elements?

What I meant by reassigning the correct message type is, replacing the message type with the wrong attribute order with the one that has to correct order.

REgards,

Ravi

Former Member
0 Kudos

Hi, thanks for your reply. There isn't a duplicate message or data type. I've accessed the message and data type from the interface mapping so I know I'm referencing the same objects. They all have the same namespace and software component version - so it wouldn't be possible to have two data or message types with the same name.

Answers (2)

Answers (2)

Former Member
0 Kudos

It seems that attributes don't have to be in any particular order - which is strange to me

Former Member
0 Kudos

I have tested this by created a message type with the attributes (sorry but I couldn't upload a screen shot)

TREE CATEGORY TYPE

TEST ELEMENT TEST

.....A ELEMENT

..........B ELEMENT

...............C ELEMENT XSD:STRING

....................CA ATTRIBUTE XSD:STRING

....................CB ATTRIBUTE XSD:STRING

....................CC ATTRIBUTE XSD:STRING

I then created a message type and a message mapping. When in the message mapping the message type appears as follows

TREE CATEGORY TYPE

TEST ELEMENT TEST

.....A ELEMENT

..........B ELEMENT

...............C ELEMENT XSD:STRING

....................CA ATTRIBUTE XSD:STRING

....................CC ATTRIBUTE XSD:STRING

....................CB ATTRIBUTE XSD:STRING

Notice that attributes CC and CB have swapped places.