No SoapException thrown even if server returns SOAP-ENV:Fault
Normally client proxies deriving from SoapHttpClientProtocol throw an exception if the webservice returns an error. But I now have the case where definitively the server returns a soap error the client does not throw an excepti开发者_运维知识库on, so the client has no way to know if the call suceeded or not (webservice has no return type).
What could cause this behaviour?
This is what the server returns:
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Date: Fri, 04 Mar 2011 15:57:32 GMT
Server: Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.8m DAV/2
Last-Modified: Fri, 04 Mar 2011 15:57:32 GMT
Content-Length: 602
Vary: Accept-Encoding
Connection: close
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>HDHPSPRT2</faultstring>
<detail>HDHPSPRT2</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Your service is violating the SOAP protocol. Faults must be returned as a 4xx or 5xx HTTP status code.
精彩评论