Posted: Sun Jan 07, 2007 7:53 pm Post subject: Having the same message definition use the same root tag
Apprentice
Joined: 17 Dec 2003 Posts: 41
Is it possible to have a series of message definitions in a single message set that are physically represented by the same root tag name.
WMB 6 v60001
We have some legacy schema definitions that all follow a general schema design pattern like this
Code:
companyXYZ
--- header
--- transport details
--- security details
--- body
-- app specific details
We have imported a couple of schemas and changed the "message" names from companyXYZ to something like
Code:
companyXYZ_msg1
companyXYZ_msg2
Then in the Physical properties ---XML1 --- Message--Xml Name i have changed the XML field name to companyXYZ for each message definition.
This compiles OK according to the toolkit but at runtime if we do a RCD with validation it throws a exception
The input XML looks something like
Code:
<? xml ...>
<companyXYZ>
<header>
--- transport details
--- security details
</header>
<body>
-- app specific details
</body>
</companyXYZ>
The exception throw is that the message identifier does not match the root tag name found.
But having search the doco and this forum it would appear that I can have a different message type name from its root tag name if I set the XMLName bit in the physical properties.
But however we dice it, weI can get it to work as expectde. HOwever if we hack the xml so the root tag is the same name as the message then it works and parses eg...
Code:
<? xml ...>
<companyXYZ_msg1>
<header>
--- transport details
--- security details
</header>
<body>
-- app specific details
</body>
</companyXYZ_msg1>
So it seems the Physical properties ---XML1 --- Message - XML Name does not work as we expect
Is it possible to have a series of message definitions in a single message set that are physically represented by the same root tag name.
Yes, it is possible to have series of message definitions in a single message set. but the limitation is you can't have more that one Global element with same name.
What bbakerman means is that all of the messages are under an XML root tag of "companyXYZ".
I don't think that what bbakerman is trying will work. I think that it's necessary to chnage the message set so that there is only one global message element with the root tag of "companyXYZ", and then include the other messages as either choices or embedded messages.
Edit: But I've been known to be wrong before. _________________ I am *not* the model of the modern major general.
Last edited by jefflowrey on Mon Jan 08, 2007 2:57 am; edited 1 time in total
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum