Author |
Message
|
lancelotlinc |
Posted: Tue Jan 15, 2013 9:21 am Post subject: Re: Diff b/n HTTP and SOAP Nodes? |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kash3338 wrote: |
lancelotlinc wrote: |
This function is required to be done in a mapping node or a compute node. |
How would you do that? |
Code: |
ESQL:
DECLARE thenamspacedefinedbyxsd NAMESPACE 'http://mynamespace.inxsd.defined.company.com';
SET OutputRoot.SOAP.Body.thenamspacedefinedbyxsd:myResponseMessage.result = 'SUCCESS';
|
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 15, 2013 9:23 am Post subject: Re: Diff b/n HTTP and SOAP Nodes? |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kash3338 wrote: |
lancelotlinc wrote: |
This function is required to be done in a mapping node or a compute node. |
How would you do that? |
The SOAPReply node will ADD an ENVELOPE.
It will not ALTER THE STRUCTURE OR ASSOCIATED PARSER of your message document to ensure that it matches the WSDL.
Particularly, if you pass it a MIME document, it will not convert that to an XML document.
Particularly, if you pass it an XML message that does not conform to the WSDL, it will not alter that message so that it does conform to the WSDL.
It will merely wrap the message into a SOAP envelope. |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:25 am Post subject: Re: Diff b/n HTTP and SOAP Nodes? |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
Code: |
ESQL:
DECLARE thenamspacedefinedbyxsd NAMESPACE 'http://mynamespace.inxsd.defined.company.com';
SET OutputRoot.SOAP.Body.thenamspacedefinedbyxsd:myResponseMessage.result = 'SUCCESS';
|
|
And what happens when I send it like this,
Code: |
ESQL:
DECLARE thenamspacedefinedbyxsd NAMESPACE 'http://mynamespace.inxsd.defined.company.com';
SET OutputRoot.XMLNSC.thenamspacedefinedbyxsd:myResponseMessage.result = 'SUCCESS'; |
And leave it to the SOAPReply node to do the rest? Does this fail over? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 15, 2013 9:26 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
As mqjeff said, you need to construct a valid payload in accordance with your service contract. It's not auto-magic. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:29 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
As mqjeff said, you need to construct a valid payload in accordance with your service contract. It's not auto-magic. |
I do agree that it should be a valid payload and there is no magic here. The above code is also fine when it goes as a response and the SOAPReply node takes care of wrapping the SOAPEnvelop here. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 15, 2013 9:30 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kash3338 wrote: |
lancelotlinc wrote: |
As mqjeff said, you need to construct a valid payload in accordance with your service contract. It's not auto-magic. |
I do agree that it should be a valid payload and there is no magic here. The above code is also fine when it goes as a response and the SOAPReply node takes care of wrapping the SOAPEnvelop here. |
Does the result match exactly the response message payload format defined in your XSD/service contract? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:34 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
Does the result match exactly the response message payload format defined in your XSD/service contract? |
Yes. When it comes out of the service it does. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 15, 2013 9:35 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kash3338 wrote: |
lancelotlinc wrote: |
Does the result match exactly the response message payload format defined in your XSD/service contract? |
Yes. When it comes out of the service it does. |
Then why do you say this is not SOAP? If your response message matches exactly the XSD, then by definition, you are returning the proper SOAP message in accordance with your service contract.
The method by which you arrived at the correct structure is highly questionable and probably not maintainable; but nonetheless, it is a SOAP message. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:41 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
Then why do you say this is not SOAP? If your response message matches exactly the XSD, then by definition, you are returning the proper SOAP message in accordance with your service contract. |
kash3338 wrote: |
Yes. When it comes out of the service it does. |
When it goes to the SOAPReply node, it is still a XML (not a SOAP) and hence this statement again is not 100%,
Quote: |
SOAP nodes can't really handle non-SOAP messages. |
|
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 15, 2013 9:43 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kash3338 wrote: |
lancelotlinc wrote: |
Then why do you say this is not SOAP? If your response message matches exactly the XSD, then by definition, you are returning the proper SOAP message in accordance with your service contract. |
kash3338 wrote: |
Yes. When it comes out of the service it does. |
When it goes to the SOAPReply node, it is still a XML (not a SOAP) and hence this statement again is not 100%,
Quote: |
SOAP nodes can't really handle non-SOAP messages. |
|
SoapReply nodes do not perform auto-magic XSD compliance operations. You think your message tree is not SOAP. But the facts say that your message tree complies with the SOAP-defined payload of your XSD. The SoapReply node did not make this enforcement. Your code did prior to the SoapReply node. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:45 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
But the facts say that your message tree complies with the SOAP-defined payload of your XSD. The SoapReply node did not make this enforcement. Your code did prior to the SoapReply node. |
Yes correct, but still when it goes to that node, it is just a XML message and hence I was right in quoting that.  |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 15, 2013 9:49 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
kash3338 wrote: |
lancelotlinc wrote: |
But the facts say that your message tree complies with the SOAP-defined payload of your XSD. The SoapReply node did not make this enforcement. Your code did prior to the SoapReply node. |
Yes correct, but still when it goes to that node, it is just a XML message and hence I was right in quoting that.  |
When your message tree goes to the SoapReply node, it is a message tree, with all its various components, maybe also including a parser reference. Message trees are not 'XML'. Message trees are serialized by WMB nodes into various bit-streams by various parsers. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Jan 15, 2013 9:56 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
lancelotlinc wrote: |
When your message tree goes to the SoapReply node, it is a message tree, with all its various components, maybe also including a parser reference. Message trees are not 'XML'. Message trees are serialized by WMB nodes into various bit-streams by various parsers. |
Well in that case we can argue for few more pages with this stuff. The message can be a serialized one by WMB, but its underlying domain is XML, which is what matters in this discussion.
All messages that run through in WMB are serialized in that case and you cannot talk about SOAP nodes even handling SOAP messages then. |
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Jan 15, 2013 11:12 am Post subject: Re: Diff b/n HTTP and SOAP Nodes? |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
The only point that kash3338 seemed to be making is that a SOAP Body without a SOAP Envelope is, technically, a "non-SOAP" message.
kash3338 wrote: |
rekarm01 wrote: |
SOAP nodes can't really handle non-SOAP messages. |
I don't think this statement is 100% correct. |
The first part of that quote was:
rekarmol wrote: |
Real briefly, ... |
... so, it might have glossed over some of the finer points. The SOAPReply node can accept a SOAP Body as input, add a SOAP envelope, and return a SOAP response to the client. Whether that qualifies as "really handling non-SOAP messages" or not is a matter of interpretation; feel free to offer a better way to phrase that.
The important points here are that the SOAPReply node must still treat the message within a SOAP context, and that the HTTPReply node would still require additional coding (to add the Envelope, or perform other checks and validations, etc.). |
|
Back to top |
|
 |
|