|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMB and handling xsi:type |
« View previous topic :: View next topic » |
Author |
Message
|
llaros |
Posted: Mon Jun 09, 2008 2:57 am Post subject: WMB and handling xsi:type |
|
|
Apprentice
Joined: 22 Jan 2008 Posts: 37
|
Hi everybody
MQSI 6.0.0.3
We are using MRM domain with namespaces enabled in the MessageSet.
Our simplified case is as follows:
REQUEST
1. Application A sends a request message (which type is specified by MQRFH2.mcd.MessageType and name of the root xml element) without xsi:type attribute. Let's call this type ATYPE
2. First flow changes message type to BTYPE; mcd and Porperties and propagates that request to Application B.
REPLY
3. Application B replies for that request with reply of type BTYPE, but this reply has specified its type by mcd, root element and xsi:type.
4. Second flow changes the type by overriding mcd and Properties with ATYPE and sends this reply to application A.
Some pict
REQUEST
A---[ATYPE]------------------------>FirstFlow-------->[BTYPE]------------------------->B
REPLY
A<--[ATYPE(xsi:type=BTYPE)]-----SecondFlow<----[BTYPE(xsi:type=BTYPE)]<----B
The problem is that application A receives a reply in which xml root element is correct, message is formed well as ATYPE messages, but it contains xsi:type=BTYPE. Is it accurate behaviour of MB? Do I have to explicity remove xsi:type attribute in the second flow? If the answer is yes that is confusing, because I already specified message type by setting properties in the message tree, so the MB should know that this message is not of type BTYPE.
Simplified means that FirstFlow is doing additional work, which is not important here.
Thanks for your replies  |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 09, 2008 4:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Do I have to explicity remove xsi:type attribute in the second flow? If the answer is yes that is confusing, because I already specified message type by setting properties in the message tree, so the MB should know that this message is not of type BTYPE. |
An xsi:type attribute overrides the declared type of an element. Root.Properties.MessageType identifies the message, and therefore identifies the global element which represents the root tag. It is therefore valid to have an xsi:type attribute on a message root tag, and it would be wrong for message broker to delete it just because your message flow modifies Root.Properties.MessageType. |
|
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
|
|
|
|