Author |
Message
|
vasanthi |
Posted: Tue Aug 30, 2005 12:30 pm Post subject: message set creation |
|
|
Apprentice
Joined: 23 Apr 2005 Posts: 42
|
Hi
i have a small doubt in creating the message set for an xml message
my sample xml message is
<name>vas</name>
<desc>abc</desc>
<stat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true">2</stat>
<id>444</id>
i need to validate the mesaage also
so can you give me some idea on how i can model the element <stat>
Regards
vasanthi |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 31, 2005 12:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
What is your 'small doubt'. Nobody is going to design the entire message set for you. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 01, 2005 2:38 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
vasanthi,
Sorry for my previous reply - I missed the last line, where you ask specifically about the element <stat>.
I presume you want to know about the xsi:nil attribute? To make the MRM XML parser insert a null when the 'xsi:nil attribute is set to "true"
1. In the logical properties for element <stat>, tick the 'nillable' check box.
2. In the XML physical properties for the message set, set either/both of 'Encoding NumericNull ' or 'Encoding Non-Numeric Null' to 'NULLXMLSchema'. |
|
Back to top |
|
 |
vasanthi |
Posted: Fri Sep 02, 2005 5:01 am Post subject: |
|
|
Apprentice
Joined: 23 Apr 2005 Posts: 42
|
Thanks Kimbert for the reply. tried it and it is working fine.sorry for asking too much but i have a similar doubt regarding the name spaces.i have created a message set for the example as below. the sample message is
<Eve xmlns1=http://www.abc.com/eve">
<name>vas</name>
<desc>abc</desc>
<id>444</id>
</Eve>
and the next message comes as
<Eve xmlns2=http://www.abc.com/eve">
<name>kris</name>
<desc>ddd</desc>
<id>456</id>
</Eve>
as you can see the namespace name xmlns is new for every new incoming message.can you please throw me some idea about how to handle this.i am asking only about handling the namespace issue.as i said earlier the message has to be validated.
regards
vasanthi |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 5:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think what you have posted is not valid XML, so I think you have made a typo.
What I think you mean is that each message/xml document will have a different value for foo in the expression xmlns:foo='http://www.abc.com/eve'
And I'm pretty sure that the parser will basically ignore this, and you don't need to try and model it. As long as the structure of the XML is correct, what a particular message/document uses for the namespace alias is ignored.
Now, if you get a document that is xmlns:foo='http://www.cba.com/eve', then the structure of the document will be different, and it will not parse. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|