Sreenivas K created CXF-8908:
--------------------------------
Summary: Correct the SOAP FAULT Error Message in
ReadHeadersInterceptor
Key: CXF-8908
URL: https://issues.apache.org/jira/browse/CXF-8908
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime, Soap Binding
Affects Versions: 3.5.3
Reporter: Sreenivas K
Our clients are invoking SOAP webservices with *GET* (for healthcheck to know
webservice is up or not) and they are failing at *ReadHeadersInterceptor* with
SOAP FAULT error like this:
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
*<faultstring>HTTP verb was not GET or POST</faultstring>*
</soap:Fault>
</soap:Body>
Throwing error is fine, but message is wrong as per the logic in
*ReadHeadersInterceptor* where you are checking only for POST:
if (verb != null && \{*}!"POST".equals(verb){*}) {
Fault formula405 = new Fault({*}"HTTP verb was not GET or POST", LOG{*});
formula405.setStatusCode(405);
throw formula405;
}
Please change error message to *HTTP verb was not POST* so that it helps
clients to understand whats wrong.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)