You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by arun_r <ia...@gmail.com> on 2019/10/23 09:14:29 UTC

java.lang.RuntimeException: Couldn't parse stream - when making soap request

I am getting the below exception when trying to send a soap request to remote
web service. I don't see any issues connecting to my web service when using
soapUI tool or when running a standalone client program. I am seeing this
issue only when I call the service from inside wildfly container.

java.lang.RuntimeException: Couldn't parse stream.
        at
org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1729)
        at
org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:127)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:805)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1684)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1560)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:518)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:427)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:328)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:281)
        at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
        at com.sun.proxy.$Proxy232.ping(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b
(at char #2, byte #-1)
        at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:578)
        at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:633)
        at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:657)
        at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:342)
        at
__redirected.__XMLInputFactory.createXMLStreamReader(__XMLInputFactory.java:143)
[jboss-modules.jar:1.6.1.Final]
        at
org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1727)
        ... 87 more
Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b
(at char #2, byte #-1)
        at
com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:304)
        at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:190)
        at
com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:254)
        at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:134)
        at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:573)
        ... 92 more

Protocol header that I am sending in the request. I couldn't enable client
side logging also.

Map<String, List&lt;String>> httpHeaders = new HashMap<String,
List&lt;String>>();
        httpHeaders.put("Accept-Encoding",
Collections.singletonList("gzip"));
        httpHeaders.put("Content-Type",
Collections.singletonList("text/xml;charset=UTF-8"));
        ((BindingProvider)
services).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,
httpHeaders);

Any help on this would be really helpful.



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: java.lang.RuntimeException: Couldn't parse stream - when making soap request

Posted by arun_r <ia...@gmail.com>.
Has anyone seen this issue before? Any suggestions or solution to overcome
this error?



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html