|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Namespace decl in Message Broker Flow |
« View previous topic :: View next topic » |
Author |
Message
|
rcrippen |
Posted: Fri Nov 14, 2008 7:17 am Post subject: Namespace decl in Message Broker Flow |
|
|
Apprentice
Joined: 01 Aug 2002 Posts: 45 Location: Rochester, NY
|
I was wondering if anyone has seen a way around this particular issue that I'm trying to resolve:
I have a Message Broker V6.0.8 Windows platform invoking an IIS webservice/.NET interface. This interface is being created by an off-shore third party company.
The SOAP envelope and Body are being properly created, but when I try to create the namespace declaration to match the .NET WebService requirements, the Message Broker throws exceptions. The Broker is complaining about no namespace identifier.
The namespace declaration for the root element that I'm trying to build which has been communicated to me is in the following form:
<TagName xmlns="http://tempuri.org/">
When I try to build this element with the namespace identifier that I've normally seen required, the webservice returns a SOAP Fault indicating it can't find the object instance.
On other namespace declarations in a webservice call, I've had to build the namespace in the following manner:
<ns:TagName xmlns:ns="http://tempuri.org/">
Has anyone seen a way (in Message Broker) to build the tag element with the namespace without an identifier?
Thanks,
Rob |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Nov 14, 2008 7:41 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi rcrippen,
You need to create the namespace as the 'default namespace'. Search the forum, you'll find sample code, else paste your namespace declaration code.
Regards. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Nov 14, 2008 8:46 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
elvis_gn is 100% correct. However, as this confuses a lot of people, here's the full answer...
Quote: |
Has anyone seen a way (in Message Broker) to build the tag element with the namespace without an identifier? |
Each element/attribute in the message tree has a namespace URI. It does not have a namespace prefix. When the message tree is written out ( usually when you hit an output node ) the broker's XML parser walks the message tree, detects the namespace declarations ( xmlns attributes ), and assigns the correct namespace prefix to each tag in the output XML.
So you simply need to put the correct namespace declaration in the message tree. |
|
Back to top |
|
 |
rcrippen |
Posted: Fri Nov 14, 2008 11:37 am Post subject: |
|
|
Apprentice
Joined: 01 Aug 2002 Posts: 45 Location: Rochester, NY
|
Thanks to the postings by previous members, I was able to get this to work. It was a little tricky and it doesn't work quite the same if you are using an XMLNSC domain versus an XMLNS domain.
The main key point is that you must define the Properties.MessageDomain to be 'XMLNS' (not XML). :) |
|
Back to top |
|
 |
kimbert |
Posted: Fri Nov 14, 2008 1:36 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Glad you got it working.
re: this comment
Quote: |
The main key point is that you must define the Properties.MessageDomain to be 'XMLNS' (not XML) |
Two comments:
- You should not use the XML domain for new message flows. It is deprecated. XMLNSC is the one to use if you want good performance and features when you upgrade.
- The parser which serializes the message tree is not identified by Properties.MessageDomain. It is the parser which is associated with the root node of the message tree. In many cases, that root node is the last child of OutputRoot, ( e.g. OutputRoot.XMLNS or OutputRoot.XMLNSC ). I expect this will provoke you into explaining what you meant  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|