Home > Back-end >  Springboot CXF structures, web service, the response of the soap HTTP response header is HTTP/1.1 20
Springboot CXF structures, web service, the response of the soap HTTP response header is HTTP/1.1 20

Time:10-10

Springboot + CXF structures, web service, the processing of the soap request, after the return of the HTTP response header is HTTP/1.1 200, rather than the HTTP/1.1 200 OK

The client code, judge the condition of success is to contain the string "200 OK", but now only "200", cause the failure of judgment, the client code and cannot be changed, so want to change the server side, also tried to intercept the HttpServletResponse, can't change the response headers,

This is the result of the soap message returns:
Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"HTTP/1.1 200 [\ r] [\ n]" //looking forward to the result is HTTP/1.1 200 OK [\ r] [\ n]
Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"The content-type: text/XML; Charset=utf-8 [\ r] [\ n]
"Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"The Content - Length: 310 [\ r] [\ n]"
Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"The Date: Fri, 12 May 2017 09:47:05 GMT [\ r] [\ n]"
Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"[\ r] [\ n]"
Fri May 12 17:47:05 CST 2017: DEBUG: & lt; <"& lt; The soap: Envelope XMLNS: soap="http://schemas.xmlsoap.org/soap/envelope/" & gt; "

CodePudding user response:

Question finally found out the reason: use springboot 1.4.0 and older versions will have this problem

CodePudding user response:

How to solve, drop version?