[esb-issues] [JBoss JIRA] (JBESB-3838) Http Provider returns 200 http response code for Soap Fault

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Aug 29 12:30:34 EDT 2012


    [ https://issues.jboss.org/browse/JBESB-3838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714643#comment-12714643 ] 

RH Bugzilla Integration commented on JBESB-3838:
------------------------------------------------

Rick Wagner <rwagner at redhat.com> made a comment on [bug 852814|https://bugzilla.redhat.com/show_bug.cgi?id=852814]

+++ This bug was initially created as a clone of Bug #845165 +++

Created attachment 601863
reproducer app

Description of problem:

When a pipeline includes a SOAPProcessor action which calls a Web Service, if the wrapped web service returns a soap fault, and HTTP response code 500, the HTTP Provider Gateway returns a response code 200 to an ESB Client, instead of the expected 500 response.

This seems contrary to the WS-I 1.0 Basic Profile specification, and breaks some Spring WS Clients.

This issue does not happen with a JBR-Provider using the HTTP protocol. The expected 500 response code is returned by it.

Version-Release number of selected component (if applicable):

ESB 4.11

How reproducible:

You can use the attached project to reproduce the issue.

Steps to Reproduce:

1. Replace the 'webservice_producer' quickstart in SOA-P 5.2 samples/quickstart directory with the one attached.

2. Run 'ant clean deploy' to deploy it to a running instance

3. Run 'ant runtest' to send a WS Request to the HTTP Provider gateway.

  
Actual results:

runtest:
[echo] Http Client
[java] Request payload:
[java] <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
[java] <soapenv:Header/>
[java] <soapenv:Body>
[java] <good:sayGoodbye>
[java] <message>goodbye</message>
[java] </good:sayGoodbye>
[java] </soapenv:Body>
[java] </soapenv:Envelope>
[java] --------------------------
[java]
[java] 16:30:38,927 DEBUG [main][header] >> "POST /Quickstart_webservice_producer/http/test/x HTTP/1.1[\r][\n]"
[java] 16:30:38,970 DEBUG [main][header] >> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "Host: localhost:8080[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "Content-Length: 292[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "[\r][\n]"
[java] 16:30:38,973 DEBUG [main][content] >> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <soapenv:Header/>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <soapenv:Body>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <good:sayGoodbye>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <message>goodbye</message>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> " </good:sayGoodbye>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> " </soapenv:Body>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> "</soapenv:Envelope>"
[java] 16:30:39,265 DEBUG [main][header] << "HTTP/1.1 200 OK[\r][\n]"
[java] 16:30:39,266 DEBUG [main][header] << "HTTP/1.1 200 OK[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "Server: Apache-Coyote/1.1[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "asyncServiceInvoke: false[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "Content-Length: 298[\r][\n]"
[java] 16:30:39,268 DEBUG [main][header] << "Date: Mon, 30 Jul 2012 06:30:39 GMT[\r][\n]"
[java] 16:30:39,268 DEBUG [main][header] << "[\r][\n]"
[java] 16:30:39,273 DEBUG [main][content] << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail"
[java] 16:30:39,273 DEBUG [main][content] << "></soap:Fault></soap:Body></soap:Envelope>"
[java]
[java] Response Status Code: 200
[java] Response payload:
[java] <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail></soap:Fault></soap:Body></soap:Envelope>
[java] --------------------------
[java]


Expected results:

runtest:
[echo] Http Client
[java] Request payload:
[java] <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
[java] <soapenv:Header/>
[java] <soapenv:Body>
[java] <good:sayGoodbye>
[java] <message>goodbye</message>
[java] </good:sayGoodbye>
[java] </soapenv:Body>
[java] </soapenv:Envelope>
[java] --------------------------
[java]
[java] 16:30:38,927 DEBUG [main][header] >> "POST /Quickstart_webservice_producer/http/test/x HTTP/1.1[\r][\n]"
[java] 16:30:38,970 DEBUG [main][header] >> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "Host: localhost:8080[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "Content-Length: 292[\r][\n]"
[java] 16:30:38,973 DEBUG [main][header] >> "[\r][\n]"
[java] 16:30:38,973 DEBUG [main][content] >> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <soapenv:Header/>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <soapenv:Body>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <good:sayGoodbye>[\n]"
[java] 16:30:38,973 DEBUG [main][content] >> " <message>goodbye</message>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> " </good:sayGoodbye>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> " </soapenv:Body>[\n]"
[java] 16:30:38,974 DEBUG [main][content] >> "</soapenv:Envelope>"
[java] 16:30:39,265 DEBUG [main][header] << "HTTP/1.1 500 Error[\r][\n]"
[java] 16:30:39,266 DEBUG [main][header] << "HTTP/1.1 500 Error[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "Server: Apache-Coyote/1.1[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "asyncServiceInvoke: false[\r][\n]"
[java] 16:30:39,267 DEBUG [main][header] << "Content-Length: 298[\r][\n]"
[java] 16:30:39,268 DEBUG [main][header] << "Date: Mon, 30 Jul 2012 06:30:39 GMT[\r][\n]"
[java] 16:30:39,268 DEBUG [main][header] << "[\r][\n]"
[java] 16:30:39,273 DEBUG [main][content] << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail"
[java] 16:30:39,273 DEBUG [main][content] << "></soap:Fault></soap:Body></soap:Envelope>"
[java]
[java] Response Status Code: 500
[java] Response payload:
[java] <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail></soap:Fault></soap:Body></soap:Envelope>
[java] --------------------------
[java]

Additional info:

--- Additional comment from jira-update at redhat.com on 2012-08-28 01:39:14 EDT ---

Sato Tadayoshi <tadayosi at gmail.com> made a comment on jira JBESB-3838

This issue should have been addressed as part of JBESB-2511.

--- Additional comment from jira-update at redhat.com on 2012-08-28 03:18:17 EDT ---

Sato Tadayoshi <tadayosi at gmail.com> made a comment on jira JBESB-3838

Attached a patch for this issue. I've verified it by running the existing unit and integration tests. We need a QA test to verify this fix itself.

--- Additional comment from jira-update at redhat.com on 2012-08-28 03:18:57 EDT ---

Sato Tadayoshi <tadayosi at gmail.com> made a comment on jira JBESB-3838

Attached a patch (JBESB-3838.patch) for this issue. I've verified it by running the existing unit and integration tests. We need a QA test to verify this fix itself.

--- Additional comment from jira-update at redhat.com on 2012-08-28 03:19:26 EDT ---

Sato Tadayoshi <tadayosi at gmail.com> made a comment on jira JBESB-3838

Attached a patch (JBESB-3838.patch) for this issue. I've verified it by running all the existing unit and integration tests. We need a QA test to verify this fix itself.

--- Additional comment from jira-update at redhat.com on 2012-08-28 04:45:12 EDT ---

Sato Tadayoshi <tadayosi at gmail.com> made a comment on jira JBESB-3838

Attached a recompiled jar (jbossesb-soap.jar) with the patch against the latest JBESB_4_11_CP branch (rev. 38166).
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/branches/JBESB_4_11_CP/product/

--- Additional comment from jira-update at redhat.com on 2012-08-28 05:41:26 EDT ---

Lucie Fabrikova <lfabriko at redhat.com> made a comment on jira JBESB-3838

I verified the problem on version SOA-P 5.3.0 GA, the patched version with reproducer generated status code 500.
Now we modify our test to reproduce the problem (add HTTP Provider).

--- Additional comment from jira-update at redhat.com on 2012-08-29 10:05:08 EDT ---

Lucie Fabrikova <lfabriko at redhat.com> made a comment on jira JBESB-3838

If the webservice works properly and returns correct result and there is no need to return fault code (500), the patch is not working, it returns response code 0. It should return 200.
                
> Http Provider returns 200 http response code for Soap Fault
> -----------------------------------------------------------
>
>                 Key: JBESB-3838
>                 URL: https://issues.jboss.org/browse/JBESB-3838
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.10, 4.11
>         Environment: SOA-P 5.2.0
> CXF WS stack
>            Reporter: Jason Shepherd
>         Attachments: JBESB-3838.patch, jbossesb-soap.jar, webservice_producer.zip
>
>
> When a pipeline includes a SOAPProcessor action which calls a Web Service, if the wrapped web service returns a soap fault, and HTTP response code 500, the HTTP Provider Gateway returns a response code 200 to an ESB Client, instead of the expected 500 response.
> This seems contrary to the WS-I 1.0 Basic Profile specification, and breaks some Spring WS Clients.
> This issue does not happen with a JBR-Provider using the HTTP protocol. The expected 500 response code is returned by it.
> You can use the attached project to reproduce the issue.
> 1. Replace the 'webservice_producer' quickstart in SOA-P 5.2 samples/quickstart directory with the one attached.
> 2. Run 'ant clean deploy' to deploy it to a running instance  
> 3. Run 'ant runtest' to send a WS Request to the HTTP Provider gateway.
> When I hit the GoodbyeWorldWS directly with SOAPUI I can see that I get a 500 HTTP response code. However in the output of the test, I can see the response of the HTTP Provider was 200:
> runtest:
>      [echo] Http Client
>      [java] Request payload:
>      [java] <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">
>      [java]    <soapenv:Header/>
>      [java]    <soapenv:Body>
>      [java]       <good:sayGoodbye>
>      [java]          <message>goodbye</message>
>      [java]       </good:sayGoodbye>
>      [java]    </soapenv:Body>
>      [java] </soapenv:Envelope>
>      [java] --------------------------
>      [java] 
>      [java] 16:30:38,927 DEBUG [main][header] >> "POST /Quickstart_webservice_producer/http/test/x HTTP/1.1[\r][\n]"
>      [java] 16:30:38,970 DEBUG [main][header] >> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
>      [java] 16:30:38,973 DEBUG [main][header] >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
>      [java] 16:30:38,973 DEBUG [main][header] >> "Host: localhost:8080[\r][\n]"
>      [java] 16:30:38,973 DEBUG [main][header] >> "Content-Length: 292[\r][\n]"
>      [java] 16:30:38,973 DEBUG [main][header] >> "[\r][\n]"
>      [java] 16:30:38,973 DEBUG [main][content] >> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://webservice_producer/goodbyeworld">[\n]"
>      [java] 16:30:38,973 DEBUG [main][content] >> "   <soapenv:Header/>[\n]"
>      [java] 16:30:38,973 DEBUG [main][content] >> "   <soapenv:Body>[\n]"
>      [java] 16:30:38,973 DEBUG [main][content] >> "      <good:sayGoodbye>[\n]"
>      [java] 16:30:38,973 DEBUG [main][content] >> "         <message>goodbye</message>[\n]"
>      [java] 16:30:38,974 DEBUG [main][content] >> "      </good:sayGoodbye>[\n]"
>      [java] 16:30:38,974 DEBUG [main][content] >> "   </soapenv:Body>[\n]"
>      [java] 16:30:38,974 DEBUG [main][content] >> "</soapenv:Envelope>"
>      [java] 16:30:39,265 DEBUG [main][header] << "HTTP/1.1 200 OK[\r][\n]"
>      [java] 16:30:39,266 DEBUG [main][header] << "HTTP/1.1 200 OK[\r][\n]"
>      [java] 16:30:39,267 DEBUG [main][header] << "Server: Apache-Coyote/1.1[\r][\n]"
>      [java] 16:30:39,267 DEBUG [main][header] << "X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1[\r][\n]"
>      [java] 16:30:39,267 DEBUG [main][header] << "asyncServiceInvoke: false[\r][\n]"
>      [java] 16:30:39,267 DEBUG [main][header] << "Content-Length: 298[\r][\n]"
>      [java] 16:30:39,268 DEBUG [main][header] << "Date: Mon, 30 Jul 2012 06:30:39 GMT[\r][\n]"
>      [java] 16:30:39,268 DEBUG [main][header] << "[\r][\n]"
>      [java] 16:30:39,273 DEBUG [main][content] << "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail"
>      [java] 16:30:39,273 DEBUG [main][content] << "></soap:Fault></soap:Body></soap:Envelope>"
>      [java] 
>      [java] Response Status Code: 200
>      [java] Response payload:
>      [java] <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>app exception!</faultstring><detail><ns1:AppException xmlns:ns1="http://webservice_producer/goodbyeworld" /></detail></soap:Fault></soap:Body></soap:Envelope>
>      [java] --------------------------
>      [java] 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the esb-issues mailing list