[ https://issues.apache.org/jira/browse/CXF-8908 ]


    evan deleted comment on CXF-8908:
    ---------------------------

was (Author: JIRAUSER300067):
The *ReadHeadersInterceptor is in* org.apache.cxf.binding.soap.interceptor, i 
think it's may out of camel's control

> 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
>            Priority: Minor
>         Attachments: image-2023-07-28-17-50-51-948.png
>
>
> 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 needs correction 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)

Reply via email to