You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Pierre Buyle <pi...@irislink.com> on 2007/11/12 17:37:23 UTC

Error reading XMLStreamReader with Spring client.

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.


Re: Error reading XMLStreamReader with Spring client.

Posted by Pierre Buyle <pi...@irislink.com>.
I tested with the 2.0.3 RC and it worked. The messages are also logged only
once.


dkulp wrote:
> 
> Pierre,
> 
> Any chance you could test with the 2.0.3 release candidates that we are 
> voting on?
> 
> They can be found here:
> http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/dist/
> 
> I know I fixed a couple of places where a stream could get "lost", but 
> they were mostly related to logging.
> 
> We've also seen similar issues when using certain firewall applications 
> in Windows.   See comments at the bottom of:
> https://issues.apache.org/jira/browse/CXF-1133
> 
> Dan
> 

-- 
View this message in context: http://www.nabble.com/Error-reading-XMLStreamReader-with-Spring-client.-tf4792225.html#a13722032
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Error reading XMLStreamReader with Spring client.

Posted by Daniel Kulp <dk...@apache.org>.
Pierre,

Any chance you could test with the 2.0.3 release candidates that we are 
voting on?

They can be found here:
http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/dist/

I know I fixed a couple of places where a stream could get "lost", but 
they were mostly related to logging.

We've also seen similar issues when using certain firewall applications 
in Windows.   See comments at the bottom of:
https://issues.apache.org/jira/browse/CXF-1133

Dan



On Monday 12 November 2007, Pierre Buyle wrote:
> 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-WSConfi
>guration-ConfiguringaClientProxy) and I get the following error:
>
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> 	at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:187) at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:56) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:207) at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
>sponse(HTTPConduit.java:1932) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HT
>TPConduit.java:1790) at
> org.apache.cxf.io.CacheAndWriteOutputStream.doClose(CacheAndWriteOutpu
>tStream.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$MessageSenderEndin
>gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.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:62
>8) at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:200
>4) at
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.jav
>a: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.handleM
>essage(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 ?



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog