Sychnronous proxy with JBoss Fuse
heiko.nolte Oct 9, 2013 5:32 AMHello,
I have created a simple route with JBoss Fuse in order to implement a proxy forwarding a message to a http/SOAP based
web service. The service returns a response the client is interested in. On the inbound side I have used the jetty
component. The SOAP based web service is called but jetty returns no response message returned by the called web service:
HTTP/1.1 200 OK
Content-Type: text/xml;charset=UTF-8
breadcrumbId: ID-HP10039113-52736-1381131998973-0-2
Server: Apache-Coyote/1.1
Accept-Encoding: gzip,deflate
Host: localhost:9093
ResponseContext: {org.apache.cxf.client=true, org.apache.cxf.message.Message.PROTOCOL_HEADERS={connection=[keep-alive], Content-Length=[2220], content-type=[text/xml;charset=UTF-8], Date=[Mon, 07 Oct 2013 07:59:16 GMT], Server=[Apache-Coyote/1.1]}, org.apache.cxf.message.inbound=true, Content-Type=text/xml;charset=UTF-8, org.apache.cxf.message.Message.ENCODING=UTF-8, org.apache.cxf.message.Message.RESPONSE_CODE=200, org.apache.cxf.binding.soap.SoapVersion=org.apache.cxf.binding.soap.Soap11@1b0e76a, org.apache.cxf.ws.policy.AssertionInfoMap={}, org.apache.cxf.transport.Conduit=conduit: class org.apache.cxf.transport.http.HTTPConduit6068917target: User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Transfer-Encoding: chunked
I can see that the web service returns a response when I write the message to a file. Is there a way to configure jetty
so that it returns the web service's response to the client.
The route:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="jetty:http://0.0.0.0:9093/contract?matchOnUriPrefix=true&bridgeEndpoint=true&throwExceptionOnFailure=false"/>
<to uri="cxf://http://testserver.org/services/contract?dataFormat=MESSAGE"/>
<to uri="file://C:/temp/fuse/inbound"/>
</route>
</camelContext>
</beans>
Kind regards,
Heiko