Hi,
I exposed some services with CXF 2.0.2 (using Spring configuration) and they
work when invoked through soapUI. Now, I'm trying to invoke them using a
JAX-WS Proxy as client (as described on
http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html#JAX-WSConfiguration-ConfiguringaClientProxy)
and I get the following error:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:187)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1932)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
at
org.apache.cxf.io.CacheAndWriteOutputStream.doClose(CacheAndWriteOutputStream.java:43)
at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:119)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at $Proxy26.getCapabilities(Unknown Source)
at CXFClient.main(CXFClient.java:47)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:628)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2004)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1917)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1072)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
... 17 more
I checked with TCPMon, and the server did send a full and valid response.
When I activate logging (using CXF config as described on
http://cwiki.apache.org/CXF20DOC/configuration.html), the inbound and
outbound are logged twice (with an empty message the second time the
outbound is logged), like this:
12-nov.-2007 17:10:29
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
--------------------------------------
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><!-- valid
content removed --></soap:Body></soap:Envelope>
--------------------------------------
12-nov.-2007 17:10:29 org.apache.cxf.interceptor.LoggingInInterceptor
handleMessage
INFO: Inbound Message
--------------------------------------
Headers: {null=[HTTP/1.1 200 OK], Content-Length=[287],
Set-Cookie=[JSESSIONID=BFAB87AB1880236BFDB94ABE2F53848D; Path=/], Date=[Mon,
12 Nov 2007 16:10:29 GMT], SOAPAction=[""], Server=[Apache-Coyote/1.1],
content-type=[text/xml;charset=UTF-8]}
Message:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><!-- valid
content removed --></soap:Body></soap:Envelope>
--------------------------------------
12-nov.-2007 17:10:29
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
--------------------------------------
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><!-- valid
content removed --></soap:Body></soap:Envelope>
--------------------------------------
12-nov.-2007 17:10:29 org.apache.cxf.interceptor.LoggingInInterceptor
handleMessage
INFO: Inbound Message
--------------------------------------
Headers: {null=[HTTP/1.1 200 OK], Content-Length=[287],
Set-Cookie=[JSESSIONID=BFAB87AB1880236BFDB94ABE2F53848D; Path=/], Date=[Mon,
12 Nov 2007 16:10:29 GMT], SOAPAction=[""], Server=[Apache-Coyote/1.1],
content-type=[text/xml;charset=UTF-8]}
Message:
--------------------------------------
The error happens just after the outbound is logged for the second time.
Any idea on what is going wrong ?
--
View this message in context:
http://www.nabble.com/Error-reading-XMLStreamReader-with-Spring-client.-tf4792225.html#a13708976
Sent from the cxf-user mailing list archive at Nabble.com.