After the cxf reports an error, resolve it independently-> unwinding now response was of unexpected text/html contenttype.

Source: Internet
Author: User

In one of my cxf projects, after modifying the URL-pattern of Web. XML, the following error is returned:

 

10:09:00 org. Apache. cxf. phase. phaseinterceptorchain dointercept
Information: Interceptor has thrown exception, unwinding now response was of unexpected text/html contenttype. Incoming portion of HTML stream: <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> Exception in thread "Main" javax. xml. ws. Soap. soapfaultexception: response was of unexpected text/html contenttype. Incoming portion of HTML stream: <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> At org. Apache. cxf. jaxws. jaxwsclientproxy. Invoke (jaxwsclientproxy. Java: 145)
At $ proxy43.gettermlist (unknown source)
At com. synjones. terminalmonitor. WebService. Client. Client. Main (client. Java: 26)
Caused by: org. Apache. cxf. Interceptor. fault: response was of unexpected text/html contenttype. Incoming portion of HTML stream: <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> At org. Apache. cxf. Interceptor. staxininterceptor. handlemessage (staxininterceptor. Java: 73)
At org. Apache. cxf. phase. phaseinterceptorchain. dointercept (phaseinterceptorchain. Java: 226)
At org. Apache. cxf. endpoint. clientimpl. onmessage (clientimpl. Java: 641)
At org. Apache. cxf. Transport. http. httpconduit $ wrappedoutputstream. handleresponseinternal (httpconduit. Java: 2102)
At org. Apache. cxf. Transport. http. httpconduit $ wrappedoutputstream. handleresponse (httpconduit. Java: 1980)
At org. Apache. cxf. Transport. http. httpconduit $ wrappedoutputstream. Close (httpconduit. Java: 1905)
At org. Apache. cxf. Transport. abstractconducting it. Close (abstractconducting it. Java: 66)
At org. Apache. cxf. Transport. http. httpconduit. Close (httpconduit. Java: 600)
At org. Apache. cxf. Interceptor. messagesenderinterceptor $ messagesenderendinginterceptor. handlemessage (messagesenderinterceptor. Java: 62)
At org. Apache. cxf. phase. phaseinterceptorchain. dointercept (phaseinterceptorchain. Java: 226)
At org. Apache. cxf. endpoint. clientimpl. Invoke (clientimpl. Java: 469)
At org. Apache. cxf. endpoint. clientimpl. Invoke (clientimpl. Java: 299)
At org. Apache. cxf. endpoint. clientimpl. Invoke (clientimpl. Java: 251)
At org. Apache. cxf. frontend. clientproxy. invokesync (clientproxy. Java: 73)
At org. Apache. cxf. jaxws. jaxwsclientproxy. Invoke (jaxwsclientproxy. Java: 124)
... 2 more

 

 

I am not sure about the error description. Google's key information: Interceptor has thrown exception, unwinding now response was of unexpected text/html contenttype. but no satisfactory answer was found. Later I saw that the prompt message contains http: // localhost: 8088/Terminal/termwebservice? WSDL. This URL has one more termwebservice than I configured.

Is the web that I just configured. the URL-pattern of XML, Which is <URL-pattern>/termwebservice/* </url-pattern>, in the past, it was <URL-pattern>/* </url-pattern>, so the problem was found, that is, adding a termwebservice to the URL,

Therefore, you can add termwebservice on the client end of the call to call the service. Because errors are misleading, you can check whether the error is correct on the Internet.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.