Author |
Message
|
stevebla |
Posted: Mon Oct 17, 2005 8:01 am Post subject: XML element values with namespace in message mapping node |
|
|
Newbie
Joined: 17 Oct 2005 Posts: 2
|
My XML source message fields are returning nulls in the Message Mapping node, presumably because the source message includes a namespace declaration, e.g. <nr1:Transaction xmlns:nr1="http://www.foo/bar/global">
<nr1:DocHeader> <nr1:Co_Code>1000</nr1:Co_Code>etc...
How can I make the MM node see the namespace qualified element values?
Any advice would be appreciated (Thank you)! |
|
Back to top |
|
 |
RichA |
Posted: Tue Oct 18, 2005 12:27 am Post subject: |
|
|
 Centurion
Joined: 14 Mar 2002 Posts: 102
|
How have you defined the message set that you are using to map from?
Did you make sure that you ticked the use namespaces box? Have you gone into the Physical properties and defined the namespace? |
|
Back to top |
|
 |
stevebla |
Posted: Tue Oct 18, 2005 4:42 am Post subject: |
|
|
Newbie
Joined: 17 Oct 2005 Posts: 2
|
'use namespaces' is ticked and the Namespace URI and Prefix are defined in the Physical Properties.
If I understand you correctly, the message mapping node does not need the equivalent of the ESQL syntax {namespace prefix}:elementname syntax. True? .. Thank you. |
|
Back to top |
|
 |
francoisvdm |
Posted: Fri Sep 08, 2006 1:58 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
Running into this same problem now with V6.... anybody got a solution?
Thanks _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 08, 2006 2:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use the XML message to create an XSD message. Import the XSD into the message set with namespace turned on. Use that message set and you should see the namespace in the mapping node (V6).
If you generate an XML from the XSD you should see the namespace prefix in the generated XML. If you don't you still got it wrong.
And remember the difference between elementDefaultForm=qualified vs unqualified(default) Sorry if not quite exact xsd syntax it is from memory...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 08, 2006 3:32 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Don't forget to set the 'Runtime Parser' property of your message set. It defaults to 'MRM' so you need to change it if you are parsing your input message with XML/XMLNS/XMLNSC domain ( ...and I hope you are using XMLNSC, unless you require features which are only available in the MRM domain ). |
|
Back to top |
|
 |
|