|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Serialize SOAP domain with MQOutput/MQReply |
« View previous topic :: View next topic » |
Author |
Message
|
ZiziTheFirst |
Posted: Tue Mar 26, 2013 10:19 am Post subject: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
In a messageflow running on WMB 7.0.0.4 I have these nodes:
MQInput -> Compute -> MQReply
The Compute contains this dummy code: (in a real flow I will need to put something in OutputRoot.SOAP.Header as well)
Code: |
CALL CopyMessageHeaders();
--CREATE LASTCHILD OF OutputRoot DOMAIN 'SOAP'; -- It does not matter whether this line is commented out or not
DECLARE myns NAMESPACE 'mydomain';
SET OutputRoot.SOAP.Body.myns:getMember.memGetReq.srcCode = 'abc';
SET OutputRoot.SOAP.Body.myns:getMember.memGetReq.memIdnum = '12345';
RETURN TRUE;
|
I expected that the SOAP domain will be serialized to a correct SOAP envelope structure by the MQReply node, like this:
Code: |
<soapenv:Envelope xmlns:soapenc="..." xmlns:soapenv="..." xmlns:xsd="..." xmlns:xsi="..." xmlns:myns="...">
<soapenv:Body>
<myns:getMember>
<memGetReq>
<srcCode>abc</srcCode>
<memIdnum>12345</memIdnum>
</memGetReq>
</myns:getMember>
</soapenv:Body>
</soapenv:Envelope>
|
However, the serialized message in the reply queue looks as follows:
Code: |
<SOAP_Domain_Msg>
<Body>
<myns:getMember xmlns:myns="...">
<memGetReq>
<srcCode>abc</srcCode>
<memIdnum>12345</memIdnum>
</memGetReq>
</myns:getMember>
</Body>
</SOAP_Domain_Msg>
|
How come? Is there a way to serialize ESQL-created SOAP domain tree correctly using MQOutput? Or is it only designed to be used with SOAP/HTTP nodes and it's a feature, not a bug, that it does not serialize correctly with other output nodes? Or do I have to specify a special format in MQMD.Format?
I made several other tests:
- when I connect the Compute result to SOAP Request node (configured to send the payload to an address where my dummy SOAP service is listening), it creates the tree correctly. Thus I supposes there's nothing wrong with the tree itself.
- when I use SOAP Envelope node with the option "Create new eveleope" checked, the tree is serialized correctly, so I guess that it's somehow possible to use SOAP domain with MQ output nodes. However, this is not an option I would like to choose, because I need to place something in the SOAP Header as well.
Note: I know that if I create the tree manually using the XMLNSC domain, it will work, it just struck me as odd that it did not work with the SOAP domain, which is much easier to construct.
Note2: I garbled the URLs on purpose, because the forum would not let me post them as it's my first post. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Mar 26, 2013 10:27 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
To get the output you want , you need to use ASBITSTREAM with RootBitStream option, then pass that result to the MQOutput node. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 26, 2013 11:04 am Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZiziTheFirst wrote: |
How come? Is there a way to serialize ESQL-created SOAP domain tree correctly using MQOutput? Or is it only designed to be used with SOAP/HTTP nodes and it's a feature, not a bug, that it does not serialize correctly with other output nodes? |
If you're putting the SOAP output in a queue, i.e. SOAP/JMS, why are you using an MQOutput node and not a SOAP node? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Tue Mar 26, 2013 12:10 pm Post subject: |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
lancelotlinc wrote: |
To get the output you want , you need to use ASBITSTREAM with RootBitStream option, then pass that result to the MQOutput node. |
Thanks for the tip, I tried adding another Compute after the first (I omitted OPTIONS because the default is RootBitStream & ValidateNone, just as required):
Code: |
CALL CopyMessageHeaders();
SET OutputRoot.BLOB.BLOB = ASBITSTREAM(InputRoot.SOAP CCSID InputRoot.MQMD.CodedCharSetId);
RETURN TRUE;
|
Unfortunatelly it did not help, output is still the same, with SOAP_Domain_Msg as root element. Even explicitly stating OPTIONS RootBitStream did not help.
I might be missing the point entirely, because I do not see how this was supposed to work when ASBISTREAM with RootBitStream option is, according to the documentation, exactly what an output node does on my behalf.
Quote: |
(ASBITSTREAM in mode) RootBitStream, in which the algorithm that generates the bit stream is the same as the algorithm that is used by an output node.
|
|
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Tue Mar 26, 2013 12:21 pm Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
Vitor wrote: |
ZiziTheFirst wrote: |
How come? Is there a way to serialize ESQL-created SOAP domain tree correctly using MQOutput? Or is it only designed to be used with SOAP/HTTP nodes and it's a feature, not a bug, that it does not serialize correctly with other output nodes? |
If you're putting the SOAP output in a queue, i.e. SOAP/JMS, why are you using an MQOutput node and not a SOAP node? |
SOAP-what node? I can't use SOAP Request, because it's not a request (I don't expect a reply). I can't use SOAP Reply, because it is not a reply. It's just a simple fire-and-forget pattern, where the message originates as MQ XML message and should (after some mapping) end in another MQ queue. This is where the Broker processing ends, the message is then picked up by a consumer's MQ client application. The fact that the resulting payload happens to be a SOAP envelope is irrelevant and purely coincidental, I would not call it SOAP/JMS.
Still, the question could also stand as follows - why does it work with SOAP Envelope node, but not with ESQL? What extra processing does it do and can I achieve it with ESQL too? (I feel it must be possible, but how?). |
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Tue Mar 26, 2013 12:33 pm Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
ZiziTheFirst wrote: |
Still, the question could also stand as follows - why does it work with SOAP Envelope node, but not with ESQL? What extra processing does it do and can I achieve it with ESQL too? (I feel it must be possible, but how?). |
Answer to this bit is pretty straightforward - SOAP Envelope creates a XMLNSC domain, which can of course easily be done using ESQL.
But the mystery of the SOAP domain + MQOutput / MQReply remains. To the information above I would only add that currently MQMD.Format = MQFMT_STRING. |
|
Back to top |
|
 |
mgk |
Posted: Tue Mar 26, 2013 12:46 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi.
Currently the SOAP domain is really designed to be used with the SOAP nodes. If you need it to serialize to a regular MQ queue then using the XMLNSC domain is the best way. However, if you can use JMS like suggested above then you can use the SOAP Request node with a JMS transport as this node does support the soap one-way message exchange pattern if your WSDL defines a one-way message. If you don't have a WSDL you can still send a one-way message if you put the node into "gateway" mode and are using WSA or set the right flag in the LocalEnvironment - this is listed in the info center:
Quote: |
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/bc19060_.htm |
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Tue Mar 26, 2013 1:05 pm Post subject: |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
Thank you all, that seems to cover all my rather inquisitive questions .
I'll stick with the XMLNSC solution, because I'm not familiar enough with SOAP/JMS and we do not have any WSDLs indeed. I'll look into mgk's suggestions a bit further, as it would probably be a much cleaner solution to use SOAP/JMS, but for now I reckon we want to stick with pure MQ for performance reasons anyway. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 26, 2013 1:14 pm Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZiziTheFirst wrote: |
I can't use SOAP Request, because it's not a request (I don't expect a reply). |
So it's a SOAP one-way operation; what's the problem?
ZiziTheFirst wrote: |
I would not call it SOAP/JMS. |
I would, and so would the software. It's SOAP, and you're using JMS. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 26, 2013 1:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZiziTheFirst wrote: |
I reckon we want to stick with pure MQ for performance reasons anyway. |
Well that's me trumped by mgk. Never disagree with the man who writes the software.
Interested by your comment here; what do you see as non-performant in the SOAP node as opposed to the MQOutput node? Where do you feel there's additional overhead? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Wed Mar 27, 2013 1:37 am Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
Vitor wrote: |
ZiziTheFirst wrote: |
I can't use SOAP Request, because it's not a request (I don't expect a reply). |
So it's a SOAP one-way operation; what's the problem? |
I was not aware of this option, I might give it a try.
Vitor wrote: |
ZiziTheFirst wrote: |
I would not call it SOAP/JMS. |
I would, and so would the software. It's SOAP, and you're using JMS. |
I never mentioned JMS, in fact I want to use MQ nodes and stay as far from JMS as possible. JMS nodes are discouraged by our internal guidelines, we have neither the skillset, nor the production deployment experience to be confident enough using JMS nodes.
Vitor wrote: |
ZiziTheFirst wrote: |
I reckon we want to stick with pure MQ for performance reasons anyway. |
Interested by your comment here; what do you see as non-performant in the SOAP node as opposed to the MQOutput node? Where do you feel there's additional overhead?
|
The IBM WebSphere Message Broker V7.0 For AIX Performance report (ftp://public.dhe.ibm.com/software/integration/support/supportpacs/individual/ip6n.pdf) says that for 2k non-persistent messages, which would be the case in our scenario, MQ (MQInput -> MQOutput) Message Rate is 5027 msgs/sec, for SOAP (SOAPInput -> SOAPReply) it's 950 msgs/sec, for JMS (JMSInput -> JMSOutput) it's 942 msgs/sec. That gave me the idea that JMS would have 5x lower throughput than MQ.
Additionally, it seems like an unnecessarry detour to construct WS-Addressing headers or create local environment settings and furthermore go through the JSM layer (with additional setup necessary?) of the SOAPRequest just to end up back on MQ where we wanted to be anyway... To be honest, I don't even know how to set up the WS-A headers or the SOAPRequest to make a simple put to a queue. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 27, 2013 4:42 am Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZiziTheFirst wrote: |
I never mentioned JMS, in fact I want to use MQ nodes and stay as far from JMS as possible. JMS nodes are discouraged by our internal guidelines, we have neither the skillset, nor the production deployment experience to be confident enough using JMS nodes. |
No one mentioned using the JMS nodes; I talked about using the SOAP nodes with JMS transport not HTTP. The MQ layer (rather than the broker layer) provides JMS support as MQ implements the JMS standard.
ZiziTheFirst wrote: |
The IBM WebSphere Message Broker V7.0 For AIX Performance report (ftp://public.dhe.ibm.com/software/integration/support/supportpacs/individual/ip6n.pdf) says that for 2k non-persistent messages, which would be the case in our scenario, MQ (MQInput -> MQOutput) Message Rate is 5027 msgs/sec, for SOAP (SOAPInput -> SOAPReply) it's 950 msgs/sec, for JMS (JMSInput -> JMSOutput) it's 942 msgs/sec. That gave me the idea that JMS would have 5x lower throughput than MQ. |
As I explained above, I never said use the JMS nodes but to use the SOAP nodes. The figures for SOAP nodes are probably SOAP/HTTP but given the discrepancy in figures there's still a question to be asked: what message rate do you need? If you need 4000 mps then those figures clearly indicate the MQ nodes, if your requirement is only 500 the SOAP nodes will do. Even if your requirement is 1000 mps you could still mostly meet it and get the SOAP nodes to do the heavy lifting, which is mostly where you came in with this post.
ZiziTheFirst wrote: |
Additionally, it seems like an unnecessarry detour to construct WS-Addressing headers or create local environment settings and furthermore go through the JSM layer (with additional setup necessary?) of the SOAPRequest just to end up back on MQ where we wanted to be anyway |
Why would you want or need WS-A or local environment just to change transport type? You'd potentially need a one-time JMS set up but WMQ will do most of that for you. It's a question of how much you save using the SOAP nodes in terms of development costs & ongoing maintenance.
ZiziTheFirst wrote: |
To be honest, I don't even know how to set up the WS-A headers or the SOAPRequest to make a simple put to a queue. |
Which you probably don't, but if you don't know that your decision is probably a sound one. As you correctly say SOAP/JMS is potentially cleaner & something you might want to look into but go in peace with your solution.
I just really wanted your views & decision making process for the benefit of future readers, and I thank you.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ZiziTheFirst |
Posted: Wed Mar 27, 2013 7:05 am Post subject: Re: Serialize SOAP domain with MQOutput/MQReply |
|
|
 Newbie
Joined: 26 Mar 2013 Posts: 7
|
Great, thanks for elaborating the answers to such depth, I'm sure the future readers will bring flowers to my grave out of thankfulness
I checked ad in fact the 500 msgs/sec would do, but what would be of the most concern is the CPU cost per message (about 4x more for JMS compared to MQ), because WMB is licenced per CPU (PVU). It would not be justified by any of the arguments.
The WS-A and LocalEnvironment would not be for changing the transport type, but to configure the one-way SOAP operation as mqk and yourself suggested. (I'm just explaining myself not to look like an idiot, not because I want to argue )
I'm quite happy to go with the XMLNSC/MQ solution and I'm glad I have learnt something about the SOAP/JMS options, because it may be useful in the future discussions about standards-based (web-)service provisioning.
Anyway, outstanding discussion , looking forward to the next one!  |
|
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
|
|
|
|