You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Rainer Faller <ra...@innovations.de> on 2001/03/15 17:53:20 UTC

Wrong http-header for SOAP-Fault response?

Hi,

I am confused with 

If I throw a SOAPException, the HTTP Header is: "HTTP/1.0 500 Internal
Server Error"

If a serializer gets an invalid value (e.g. "40a" for xsd:int), the HTTP
Header is: "HTTP/1.0 400 Bad Request"

Frank Mantek told me in the newsgroup microsoft.public.xml.soapsdk: "I
might be mistaken, but every soapfault has to have an http status of
500. That's clearly defined in the soap spec."
The SOAP spec refers to the "Hypertext Transfer Protocol -- HTTP/1.1"
(RFC 2616), where the codes are defined. 

- Why does the API sent different HTTP Headers? 
- How can I throw a SOAPException inside my own serializer (well, it has
to implement the serializer-interface, so I can't declare that the
method signature throws a SOAPException)

(Some background: The MS SOAP beta 2 generates a runtime error, when a
"HTTP/1.0 400 Bad Request"-response is parsed)

I appreciate any help and comment.

Rainer