7 Replies Latest reply on Jun 26, 2013 3:42 PM by Jeff Bride

    SOAPFault with HTTP 200 response code

    Jeff Bride Novice


        in some situations, switchyard returns a SOAPFault message using an HTTP 200 response code


      the problem can be reproduced in the latest master branch using the soap-binding-rpc quickstart.

      this problem is specific to RPC/Literal ...... all is well with DOC/LIT.


      to reproduce the problem, build and deploy the soap-binding-rpc quickstart and send to the SOAP service a soap message with an incorrect namespace.

      ie:    intentionally change the namespace of the SOAP message to:    rn:switchyard-quickstart:external:1.0    (drop the initial 'u' )


      org.switchyard.component.soap.InboundHandler.assertComposedMessageOK( ....  )   correctly identifies the problem and throws a SOAPException

      subsequently, the response back to the client is the correct SOAPFault message however it is returning using an HTTP 200 response code.


      Interestingly, scenarios using the same quickstart that throw a SwitchyardException (ie:  sending the SOAP message with correct namespace but with a null "day" field) route through a different error handling path where the SOAPFault message is correctly returned using an HTTP 500 response code



      thank you.   Jeff