I'm invoking a Sonic web service who in turn invokes a 3rd-party web service.
SOAP Fault response messages contain the wrong HTTO status code 200 (success).
According to the SOAP specification it should be 500 (failure).
As a result I'm unable to access the SOAP Fault in my OE 10.1x client:
Error receiving Web Service Response: No message received (11773).
How can I modify in Sonic the HTTP status code in case of a SOAP Fault returned by the 3rd-party web service?
Actually, the SOAP spec is a little unclear on this, as it specifically refers to SOAP processing errors, not explicit client errors.
In case of a SOAP error while processing the request, the SOAP HTTP server MUST issue an HTTP 500 “Internal Server Error” response and include a SOAP message in the response containing a SOAP Fault element (see section 4.4) indicating the SOAP processing error.
But what if if there is no SOAP error while processing/SOAP processing error? Rather, it is a business error that results in an explicit soap fault.
An INSTANCE MUST use a “500 Internal Server Error” HTTP status code if the response message is a SOAP Fault.
You can set the HTTP response code by setting it in the reply message. (I think you set the X-HTTP-ResponseCode, but I'm not 100% sure of the name.)
(Note: I am assuming you are not using Sonic 8.0 which handles this correctly)
Thanks for your reply.
I will pass your suggestions to our Sonic engineer.
We use Sonic 7.5/6.