One of my CXF projects, after modifying the Web.xml Url-pattern, calls an error, as follows:
2009-12-8 10:09:00 Org.apache.cxf.phase.PhaseInterceptorChain dointercept
Information: Interceptor has thrown exception, unwinding now Response is of unexpected text/html contenttype. incoming Porti On 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 is 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 $Proxy 43.getTermList (Unknown Source)
At Com.synjones.terminalmonitor.webservice.client.Client.main (client.java:26)
caused By:org.apache.cxf.interceptor.Fault:Response was unexpected text/html contenttype. incoming portion of H TML 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.AbstractConduit.close (abstractconduit.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
The main reason is that I do not have the wrong description, Google the key information: Interceptor has thrown exception, unwinding now Response is of unexpected text/html Content Type. But did not find the satisfactory answer, later a look, the message of the hint has http://localhost:8088/terminal/TermWebservice/TermWebservice?wsdl, This URL is more than I have configured a termwebservice
Is that I have just more than web.xml of the Url-pattern, for the <url-pattern>/termwebservice/*</url-pattern> /*</url-pattern>, so the problem is found, is the URL to add a termwebservice,
So in the client side of the call, plus termwebservice so in the call can be, because the error is more misleading, and online query there is no, hope to help have the same wrong brother.