Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3838

Http Provider returns 200 http response code for Soap Fault

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.10, 4.11
    • Fix Version/s: 4.11 CP1
    • Component/s: Web Services
    • Labels:
      None

      Description

      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]

        Gliffy Diagrams

          Attachments

          1. JBESB-3838.patch
            6 kB
          2. jbossesb-soap.jar
            180 kB
          3. webservice_producer.zip
            17 kB

            Issue Links

              Activity

                People

                • Assignee:
                  mageshbk Magesh Bojan
                  Reporter:
                  jshepher Jason Shepherd
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: