Hi,
I am using servicemix 4.3 and my usecase flow is like below
http client --> http consumer ---> camel -->http provider --> Out Side HTTP
Service
Outside HTTP Service returns xml file
Configuration:
<http:endpoint service="picf:httpManuTransmit"
endpoint="endpoint"
targetService="picf:routerChubbPDB"
role="consumer"
locationURI="http://0.0.0.0:8192/manuTransmit/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out" >
</http:endpoint>
<camel:route streamCache="true">
<camel:from
uri="jbi:service:http://planetsoft.com/picf2/routerChubbPDB?mep=in-out" />
<camel:to
uri="jbi:endpoint:http://planetsoft.com/picf2/httpMEF/endpoint?mep=in-out"
/>
<convertBodyTo type="java.lang.String"/>
</camel:route>
<http:endpoint service="picf:httpMEF" endpoint="endpoint"
role="provider" soap="false"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
locationURI="http://localhost:8080/jsp-examples/checkbox/tppStub.jsp">
Exception:
com.ctc.wstx.exc.WstxIOException: Attempted read on closed stream.
at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:536)[104:woodstox-core-asl:4.0.8]
at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:585)[104:woodstox-core-asl:4.0.8]
at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:641)[104:woodstox-core-asl:4.0.8]
at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:323)[104:woodstox-core-asl:4.0.8]
at
org.apache.servicemix.jbi.jaxp.StAXSourceTransformer.toXMLStreamReader(StAXSourceTransformer.java:86)[81:servicemix-utils:1.4.0]
at
org.apache.servicemix.soap.marshalers.SoapWriter.writeContents(SoapWriter.java:218)[169:servicemix-soap:2011.01.0]
at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:127)[169:servicemix-soap:2011.01.0]
at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)[169:servicemix-soap:2011.01.0]
at
org.apache.servicemix.http.processors.ProviderProcessor.writeMessage(ProviderProcessor.java:343)[170:servicemix-http:2011.01.0]
at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:131)[170:servicemix-http:2011.01.0]
at
org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:400)[169:servicemix-soap:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:651)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:606)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:501)[121:servicemix-common:2011.01.0]
at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:370)[121:servicemix-common:2011.01.0]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]
Caused by: java.io.IOException: Attempted read on closed stream.
at
org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:183)[168:org.apache.servicemix.bundles.commons-httpclient:3.1.0.5]
at
org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:107)[168:org.apache.servicemix.bundles.commons-httpclient:3.1.0.5]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)[:1.6.0_24]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)[:1.6.0_24]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)[:1.6.0_24]
at java.io.InputStreamReader.read(InputStreamReader.java:167)[:1.6.0_24]
at
com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:250)[104:woodstox-core-asl:4.0.8]
at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:133)[104:woodstox-core-asl:4.0.8]
at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)[104:woodstox-core-asl:4.0.8]
I have used convertBody function to convert string. Why it is throwing
exception.I have seen same exception when converted to DOMSource also.
Please find attached files,log for your reference.
Please suggest me.
Regards,
Praveen Chakinala
http://servicemix.396122.n5.nabble.com/file/n4741541/servicemix.log
servicemix.log
http://servicemix.396122.n5.nabble.com/file/n4741541/camel-context.xml
camel-context.xml
http://servicemix.396122.n5.nabble.com/file/n4741541/xbean.xml xbean.xml
--
View this message in context:
http://servicemix.396122.n5.nabble.com/com-ctc-wstx-exc-WstxIOException-Attempted-read-on-closed-stream-tp4741541p4741541.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.