[ https://issues.apache.org/jira/browse/CXF-8908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748972#comment-17748972 ]
Andriy Redko commented on CXF-8908: ----------------------------------- [~Sreeni] the error message is correct (in this context): - the first line of {*}ReadHeadersInterceptor{*}::handleMessage checks if this is a GET request - the line you have highlighted check if the method is POST or not - collectively, those two checks filter out the HTTP methods which are not POST or GET > 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)