Author |
Message
|
mqxplorer |
Posted: Tue May 04, 2010 8:08 am Post subject: Issue with SOAP fault message - SOAP nodes |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi All,
I have a simple pass through message flow with follwing flow:
MQInput Node --> SOPAEnvelope Node ---> SOAPRequest Node ---> SOAPExtract Node ---> MQOutput Node
when there is a successful response from the backend service, it is all fine, however, when there is a fault response, the problem starts.. The backend service is sending the fault response with an HTTP status code of 200 which broker is treating as a successful response and propagating the message to 'Out' termianl of the SOAPRequest node..and there is a parsing error for this message.....
As far as I understood...the SOAPRequest node is propagating the response message to it's different terminals depending on the HTTP status code in the HTTPResponse Header of the response mesage, however, if SOAPRequest node is propagating the messages based on http status code then how can broker handle SOAP over JMS messaging?
The argument from my data architect / schema / WSDL creator, the SOAP request node should propagate the message to different terminals based on the SOAP message (success/ fault), not based on HTTP Status code..... I would expect this should be true..however, I do not have a concrete example or documentation..
It would be great, if someone can shed some light on this...
Thanks in advance... |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue May 04, 2010 8:29 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi mqxplorer,
The SOAPRequest node or any other node within the broker will send the message to the failure terminal when some exception occurs within the broker.
The failure response from your backend system is a proper xml message for the broker, hence it will not throw an error on it.
You will need to check the status code of the response and act accordingly.
Regards. |
|
Back to top |
|
 |
skidewd |
Posted: Tue May 04, 2010 10:08 am Post subject: |
|
|
 Novice
Joined: 20 Mar 2010 Posts: 12
|
elvis_gn wrote: |
Hi mqxplorer,
The SOAPRequest node or any other node within the broker will send the message to the failure terminal when some exception occurs within the broker.
The failure response from your backend system is a proper xml message for the broker, hence it will not throw an error on it.
You will need to check the status code of the response and act accordingly.
Regards. |
Well, SOAPRequest node also features 'Fault' terminal. Based on the MB docs, SOAP faults returned by the provider will be sent to that terminal:
"SOAP fault messages received in response to the sent request are directed to the Fault terminal. If no connection is provided to the Fault terminal no further processing occurs for a received fault within this message flow" |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue May 04, 2010 10:19 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi skidewd,
skidewd wrote: |
elvis_gn wrote: |
Hi mqxplorer,
The SOAPRequest node or any other node within the broker will send the message to the failure terminal when some exception occurs within the broker.
The failure response from your backend system is a proper xml message for the broker, hence it will not throw an error on it.
You will need to check the status code of the response and act accordingly.
Regards. |
Well, SOAPRequest node also features 'Fault' terminal. Based on the MB docs, SOAP faults returned by the provider will be sent to that terminal:
"SOAP fault messages received in response to the sent request are directed to the Fault terminal. If no connection is provided to the Fault terminal no further processing occurs for a received fault within this message flow" |
My understanding is that the docs meant error codes of 404 etc which are *thrown* by the called system/service. But if you're going to get a proper SOAP fault reply, then that's not a fault inside the broker.
Regards. |
|
Back to top |
|
 |
mqxplorer |
Posted: Tue May 04, 2010 10:20 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi Elvis,
Thanks for your response...
My basic question is: Does SOAPReuqest node look for the HTTPStatus code of the web service response before it propagates the message to its different terminals ... (Out, Failure and Fault ) or it looks for somthing in the message in which it is interested and propagates accordingly?
My back end servcie developer is telling me that he would send me the soap fault message with status code 200. When WMB sends the request to the backend service, they are searching for some student records based on the request sent from WMB and if they are not able to find a student record, they are sending a message 'Student does not exist' as a sopa falut message. As the soap fault message is coming with a status code of 200, SOAPRequest node is propagating the message to the 'out' terminal where the validation is failing and throwing an exception....When I contacted the developer who creates WSDL and XSDs, he said, the soap fault message coming from the back-end servcie is of incorrect format, however, the backend servcie is craeting a correct soap fault message and they are going to send it with status code fo 200 only...Here I need to answer the backend servcie developer....... if he sends a correct soap fault message with status code 200, will SOAPRequest node propagate the messageto Fault termianl based on the sopa falut message or it looks only for the status code and propagates the message to the 'Out' terminal?
Thanks in advance.. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 04, 2010 10:24 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should confirm with the SOAP standard that it is legal to send back a Fault with an HTTP status of 200.
You probably want to change the WSDL so that one possible valid response message is "Student Does not Exist", rather than representing a fault... |
|
Back to top |
|
 |
mqxplorer |
Posted: Tue May 04, 2010 1:51 pm Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Quote: |
You should confirm with the SOAP standard that it is legal to send back a Fault with an HTTP status of 200.
You probably want to change the WSDL so that one possible valid response message is "Student Does not Exist", rather than representing a fault...
|
so..the propagation of web service response message by SOAPRequest node to its different terminals always depends on the HTTPStatus of the response mesage header?
If that is the case ...how can broker handle SOAP over JMS? --
Thanks |
|
Back to top |
|
 |
mgk |
Posted: Tue May 04, 2010 3:09 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
Here I need to answer the backend servcie developer....... if he sends a correct soap fault message with status code 200, will SOAPRequest node propagate the messageto Fault termianl based on the sopa falut message or it looks only for the status code and propagates the message to the 'Out' terminal? |
The SOAPRequest node looks at two things in the response message. It looks at the first child on the SOAPBody, to see if the response is a Fault and it looks at the HTTPStatus code. If the body is a Fault and the Status code is 500 then the message goes to the Fault terminal. However if the body is a Fault and the Status code is 200 it will throw an exception as that is not valid according to the SOAP spec...
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 |
|
 |
mqxplorer |
Posted: Tue May 04, 2010 6:30 pm Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Quote: |
The SOAPRequest node looks at two things in the response message. It looks at the first child on the SOAPBody, to see if the response is a Fault and it looks at the HTTPStatus code. If the body is a Fault and the Status code is 500 then the message goes to the Fault terminal. However if the body is a Fault and the Status code is 200 it will throw an exception as that is not valid according to the SOAP spec... |
Thanks for clarifying my doubt....Now I can go back to the backend application team and say confidently that they need to setup the status code as 5xx along with soap fault message...
Thanks
mqxplorer |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 05, 2010 2:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mqxplorer wrote: |
Quote: |
The SOAPRequest node looks at two things in the response message. It looks at the first child on the SOAPBody, to see if the response is a Fault and it looks at the HTTPStatus code. If the body is a Fault and the Status code is 500 then the message goes to the Fault terminal. However if the body is a Fault and the Status code is 200 it will throw an exception as that is not valid according to the SOAP spec... |
Thanks for clarifying my doubt....Now I can go back to the backend application team and say confidently that they need to setup the status code as 5xx along with soap fault message... |
Or reexamine the business justification that "student does not exist" is actually an error condition of some kind, and not a perfectly valid response.
If it's an error condition, then throw a fault and set 5xx.
If it's a valid response, then modify the wsdl to include this possibility as a valid response document and return 200. |
|
Back to top |
|
 |
mqxplorer |
Posted: Wed May 05, 2010 6:42 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
The backend is a mainframe application. As they do not ahve MQ on mainframe...they are using Jaus Web Server to expose their application as a web service. When I asked the backend application team to set up the status code to 500, they are telling that they do not know the way to set this status code to 500. When they are sending the soap fault response with status code 200, broker is thrwoing an excetion and propagating the rolled back message to 'Failure' terminal along with the exceptionlist. They are expecting that the broker should not lose the soap fault response they sent even if the broker throws exception...I do not think, it is true....I cannot see the soap fault response in the exceptionlist as well..which I think, I cannot..However, I have a question regarding the exceptionlist.
Here I am posting the exceptionlist, I captured using trace node..
Code: |
ExceptionList: ( ['MQROOT' : 0xa22d4b0]
(0x01000000:Name):RecoverableException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 957 (INTEGER)
(0x03000000:NameValue):Function = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
(0x03000000:NameValue):Type = 'ImbRequestTemplateNode' (CHARACTER)
(0x03000000:NameValue):Name = 'UpdateStudent_ATS_Flow#FCMComposite_1_9.gen/createDOEStudent_UpdateStudent_ats_dev_v1_0_UpdateStudent_ATS_Flow#FCMComposite_1_1' (CHARACTER)
(0x03000000:NameValue):Label = 'UpdateStudent_ATS_Flow.createDOEStudent_UpdateStudent_ats_dev_v1_0.Request' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 2230 (INTEGER)
(0x03000000:NameValue):Text = 'Node throwing exception' (CHARACTER)
(0x01000000:Name ):RecoverableException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\WebServices\WSLibrary\ImbSOAPRequestNode.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 2148 (INTEGER)
(0x03000000:NameValue):Function = 'ImbSOAPRequestNode::logWebServiceInvocationException' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 3162 (INTEGER)
(0x03000000:NameValue):Text = 'WebService Request Exception' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 12 (INTEGER)
(0x03000000:NameValue):Text =
'436f6e74656e742d4c656e6774683a20313931310d0a436f6e74656e74
2d547970653a20746578742f786d6c3b20636861727365743d69626d2
d3433370d0a486f73743a206c6f63616c686f73743a373030300d0a534f
4150416374696f6e3a2075726e3a637265617465444f4553747564656
e740d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a0d0
a' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 12 (INTEGER)
(0x03000000:NameValue):Text =
'3c736f6170656e763a456e76656c6f706520786d6c6e733a736f617065
6e633d22687474703a2f2f736368656d61732e786d6c736f61702e6f726
72f736f61702f656e636f64696e672f2220786d6c6e733a736f6170656e7
63d22687474703a2f2f736368656d61732e786d6c736f61702e6f72672f
736f61702f656e76656c6f70652f2220786d6c6e733a7873643d2268747
4703a2f2f7777772e77332e6f72672f323030312f584d4c536368656d61
2220786d6c6e733a7873693d22687474703a2f2f7777772e77332e6f72
672f323030312f584d4c536368656d612d696e7374616e6365223e3c73
6f6170656e763a426f64793e3c4e53313a637265617465444f45537475
64656e7420786d6c6e733a4e53313d22687474703a2f2f7363686f6f6c7
32e6e79632e676f762f444f452e53657276696365732e53747564656e7
4496e666f2f55706461746553747564656e74536572766963655f76312
23e3c4e53313a7472616e73616374696f6e4865616465723e3c4e5332
3a676c6f62616c494420786d6c6e733a4e53323d22687474703a2f2f736
3686f6f6c732e6e79632e676f762f444f452e53657276696365732e436f6
d6d6f6e223e3130313030363931363533303439383331333930343639
35323130303035333c2f4e53323a676c6f62616c49443e3c4e53333a73
6f7572636553797374656d20786d6c6e733a4e53333d22687474703a2f
2f7363686f6f6c732e6e79632e676f762f444f452e53657276696365732e
436f6d6d6f6e223e4553423c2f4e53333a736f7572636553797374656d3
e3c4e53343a74696d655374616d7020786d6c6e733a4e53343d226874
74703a2f2f7363686f6f6c732e6e79632e676f762f444f452e5365727669
6365732e436f6d6d6f6e223e323031302d30342d31345431303a30353a
30372e3437393535332d30373a30303c2f4e53343a74696d655374616
d703e3c4e53353a6576656e745479706520786d6c6e733a4e53353d22
687474703a2f2f7363686f6f6c732e6e79632e676f762f444f452e536572
76696365732e436f6d6d6f6e223e63726561746553747564656e743c2f
4e53353a6576656e74547970653e3c2f4e53313a7472616e736163746
96f6e4865616465723e3c4e53363a53747564656e7420786d6c6e733a4
e53363d22687474703a2f2f7363686f6f6c732e6e79632e676f762f444f4
52e53657276696365732e53747564656e74496e666f223e3c4e53363a
73747564656e74506572736f6e616c3e3c4e53363a6e616d653e3c6c61
73744e616d653e544553543730383c2f6c6173744e616d653e3c666972
73744e616d653e54455354464e414d453730383c2f66697273744e616
d653e3c2f4e53363a6e616d653e3c4e53363a64656d6f6772617068696
3496e666f3e3c6269727468446174653e323031302d30342d31343c2f6
269727468446174653e3c4e53363a67656e646572547970653e3c4e53
373a636f646520786d6c6e733a4e53373d22687474703a2f2f7363686f6
f6c732e6e79632e676f762f444f452e53657276696365732e436f6d6d6f6
e223e463c2f4e53373a636f64653e3c2f4e53363a67656e646572547970
653e3c2f4e53363a64656d6f67726170686963496e666f3e3c4e53363a6
16464726573734c6973743e3c4e53363a616464726573733e3c4e5336
3a616464726573733e3c7374726565744e756d6265723e3232353c2f7
374726565744e756d6265723e3c7374726565744e616d653e536d6974
682053742e3c2f7374726565744e616d653e3c636974793e4e6577205
96f726b3c2f636974793e3c626f726f7567683e4d3c2f626f726f7567683
e3c737461746550726f76696e63653e4e593c2f737461746550726f766
96e63653e3c706f7374616c436f64653e31303030333c2f706f7374616c
436f64653e3c4e53363a756e6974547970653e556e4b6e6f776e3c2f4e5
3363a756e6974547970653e3c2f4e53363a616464726573733e3c2f4e5
3363a616464726573733e3c2f4e53363a616464726573734c6973743e
3c2f4e53363a73747564656e74506572736f6e616c3e3c4e53363a7374
7564656e74436f6e746163744c6973743e3c4e53363a73747564656e7
4436f6e746163743e3c4e53363a6e616d653e3c6c6173744e616d653e5
06c6173743730383c2f6c6173744e616d653e3c66697273744e616d653
e5046697273743730383c2f66697273744e616d653e3c2f4e53363a6e6
16d653e3c4e53363a72656c6174696f6e73686970547970653e3c4e533
63a72656c6174696f6e736869703e3c4e53383a636f646520786d6c6e7
33a4e53383d22687474703a2f2f7363686f6f6c732e6e79632e676f762f4
44f452e53657276696365732e436f6d6d6f6e223e30313c2f4e53383a63
6f64653e3c2f4e53363a72656c6174696f6e736869703e3c2f4e53363a7
2656c6174696f6e73686970547970653e3c2f4e53363a73747564656e7
4436f6e746163743e3c2f4e53363a73747564656e74436f6e746163744
c6973743e3c2f4e53363a53747564656e743e3c2f4e53313a637265617
465444f4553747564656e743e3c2f736f6170656e763a426f64793e3c2f
736f6170656e763a456e76656c6f70653e' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 12 (INTEGER)
(0x03000000:NameValue):Text = '485454502f312e3120323030204f4b0d0a436f6e74656e742d54797065
3a20746578742f786d6c3b636861727365743d69626d2d3433370d0a4
36f6e74656e742d4c656e6774683a203634390d0a446174653a205765
642c203035204d617920323031302031333a32393a343020474d540d0
a5365727665723a204170616368652d436f796f74652f312e310d0a0d0
a' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 12 (INTEGER)
(0x03000000:NameValue):Text =
'3c736f6170656e763a456e76656c6f706520786d6c6e733a736f617065
6e763d22687474703a2f2f736368656d61732e786d6c736f61702e6f726
72f736f61702f656e76656c6f70652f2220786d6c6e733a737475643d22
687474703a2f2f7363686f6f6c732e6e79632e676f762f444f452e536572
76696365732f53747564656e74496e666f2220786d6c6e733a646f653d
22687474703a2f2f7363686f6f6c732e6e79632e676f762f444f452e5365
7276696365732e436f6d6d6f6e223e3c736f6170656e763a426f64793e3
c736f6170656e763a4661756c743e3c6661756c74636f64653e5365727
665723c2f6661756c74636f64653e3c6661756c74737472696e673e537
47564656e7420616c7265616479206578697374733c2f6661756c7473
7472696e673e3c64657461696c3e3c737475643a4154534661756c743
e3c646f653a6661756c74636f64653e5365727665723c2f646f653a6661
756c74636f64653e3c646f653a6661756c74737472696e673e53747564
656e7420616c7265616479206578697374733c2f646f653a6661756c74
737472696e673e3c646f653a64657461696c3e3c646f653a656e766972
6f6e6d656e743e4154534445563c2f646f653a656e7669726f6e6d656e7
43e3c646f653a74696d657374616d703e323031303034323731333238
32303738333c2f646f653a74696d657374616d703e3c646f653a6d6f647
56c653e57505f435245415445444f4553545544454e543c2f646f653a6d
6f64756c653e3c2f646f653a64657461696c3e3c2f737475643a4154534
661756c743e3c2f64657461696c3e3c2f736f6170656e763a4661756c74
3e3c2f736f6170656e763a426f64793e3c2f736f6170656e763a456e766
56c6f70653e' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'POST /Sample HTTP/1.1
' (CHARACTER)
)
(0x01000000:Name ):RecoverableException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\WebServices\WSLibrary\ImbSOAPRequestNode.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 1243 (INTEGER)
(0x03000000:NameValue):Function = 'ImbSOAPRequestNode::requestData' (CHARACTER)
(0x03000000:NameValue):Type = 'ImbRequestTemplateNode' (CHARACTER)
(0x03000000:NameValue):Name = 'UpdateStudent_ATS_Flow#FCMComposite_1_9.gen/createDOEStudent_UpdateStudent_ats_dev_v1_0_UpdateStudent_ATS_Flow#FCMComposite_1_1' (CHARACTER)
(0x03000000:NameValue):Label = 'UpdateStudent_ATS_Flow.createDOEStudent_UpdateStudent_ats_dev_v1_0.Request' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 3710 (INTEGER)
(0x03000000:NameValue):Text = 'A SOAP Request node received a SOAP Fault response message, but the HTTP Status code was Success (2xx).' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'HTTP/1.1 200 OK' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'http://localhost:7000/Sample' (CHARACTER)
)
)
)
)
)
|
Is the text below - cut and past from the above trace ..the soap fault recived from the backend application...this might little bit immature question..but I would like to know what that text corresponds to..
ANy help would be appreciated...
Thanks
mqxplorer
[edit] edited for readability[/edit] |
|
Back to top |
|
 |
wmb_wannabe |
Posted: Tue Nov 02, 2010 11:04 am Post subject: |
|
|
Newbie
Joined: 02 Nov 2010 Posts: 5
|
[I am having similiar issue, did you found a solution? How do we extract the actual soap fault here? ] |
|
Back to top |
|
 |
paranoid221 |
Posted: Tue Nov 02, 2010 7:07 pm Post subject: |
|
|
 Centurion
Joined: 03 Apr 2006 Posts: 101 Location: USA
|
People People People... I find it rather bewildering that more and more folks are asking this question.
Having gotten into WMB development, you should already be able to understand and comprehend what an exception tree looks like. You should have by now realized that the description of a given exception is contained in the "Text" child of every insert. In the trace you added to your post, that content is being shown in HEX. Convert that to a string by writing a simple java class (hardly a few lines of code) and you have what you are looking for. _________________ LIFE is a series of complex calculations, somewhere multiplied by ZERO. |
|
Back to top |
|
 |
joebuckeye |
Posted: Wed Nov 03, 2010 6:14 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
paranoid221 wrote: |
In the trace you added to your post, that content is being shown in HEX. Convert that to a string by writing a simple java class (hardly a few lines of code) and you have what you are looking for. |
Even simpler than a Java class, use a tiny Perl script:
Code: |
#!/usr/bin/perl -w
while (<>) {
print pack("H*",$_);
}
|
I believe I got this from Jeff on this site. |
|
Back to top |
|
 |
WMBSAM |
Posted: Wed Nov 03, 2010 1:04 pm Post subject: |
|
|
 Voyager
Joined: 02 Oct 2009 Posts: 90 Location: Atlanta
|
Hi all ,
I have experienced the same issue please enable the tcp-ip monitor and then intercept the response (soap fault in this case) do the necessary to resolve the issue.
In my case the webservice that i was calling was not sending the proper soap fault which should be according to the standard schema which is SOAP v 1.1 and SOAP v 1.2 . So i think in your case they might not be sending the proper soap fault . this can be confirmed by enabling the tcp ip monitor and intercept the response. then compare the fault with the standard fault msg from w3.org
tcpip monitor in ur toolkit :Windows-->shortview-->others-->type tcpipmonitor in the search and enable the monitor.
i think this might  |
|
Back to top |
|
 |
|