Hi,

I'm trying to use Camel as a web service proxy.
I've then configured 2 CXF endpoints :

 <cxf:cxfEndpoint id="helloServiceEndpoint" address="/helloservice"
        serviceClass="com.test.HelloService" />
        
<cxf:cxfEndpoint id="helloServiceDistantEndpoint"
        address="http://localhost:8088/mockHelloService";
        serviceClass="com.test.HelloService" />

and a simple route :

<route id="traiterDemandeSoap">
        <from uri="cxf:bean:helloServiceEndpoint" />
        <to uri="log:input"/>
        <to uri="cxf:bean:helloServiceDistantEndpoint" />
</route>

Everything is packaged as a war and deployed in JBoss 5.1.0.

To call my route as a webservice, i use SoapUI.
I also use SoapUI on port 8088 as a mock for the distant webservice.

If i directly call the SoapUI mock from SoapUI, everything is ok but when i
use my route, it seems that CXF has a problem to deal with the response :

17:15:06,340 ERROR [DefaultErrorHandler] Failed delivery for exchangeId:
pc-dev-49-54952-1321373519881-0-1. Exhausted after delivery attempt: 1
caught: 
java.lang.RuntimeException: Couldn't parse stream.
        at
org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1181)
        at
org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:104)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:783)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1499)
        at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:371)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
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:536)
        at 
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:585)
        at 
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:610)
        at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:316)
        at
org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1179)
        ... 9 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:303)
        at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:189)
        at
com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:250)
        at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:133)
        at 
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)
        ... 13 more

When i analyse the network traffic with wireshark, there are four http
requests :
- a POST that is sent by SoapUI to call the route
- a second POST request sent by Camel to call the distant web service
(SoapUI mock)
- the response to the previous POST with a http status 200
- a HTTP 500 (internal servlet error) due to the previous stack trace

What i see is that the POST response is in gzip format (Content-Encoding:
gzip\r\n) and maybe this is the problem ??


I really need help.


--
View this message in context: 
http://camel.465427.n5.nabble.com/CFX-problem-when-receiving-web-service-response-tp4994825p4994825.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to