Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Proxying RESTful service using the REST DSL :Camel 2.14.0

$
0
0
I am new to Camel, I want to proxy my RESTful webservice so I can provide
additional output formats on top of json and xml. I then used the REST dsl
for this and RestConfiguration component is "jetty". My Real webservice uses
JaxB and Jackson httpconvertters. At the moment I was just doing a
passthrough service no transformations.

The call comes in, and get forwarded to the real webservice, the service
returns the correct response whether xml or inputstream with xml data, but
the it is not returned to the caller. If I use normal routes the caller get
the response correctly.
Spring DSL(Part of):
<rest path="/api/rest">
<camel:get uri="/testResource">
<to
uri="http://localhost:8080/api-service-rest/users/6/0?bridgeEndpoint=true橪;throwExceptionOnFailure=true"
/>
</camel:get>
</rest>

Normal route works:
<route>
<from uri="jetty:http://ZARDPLPT6014:1101/test" />
<to
uri="http://localhost:8080/api-service-rest/users/6/0?bridgeEndpoint=true橪;throwExceptionOnFailure=false"
/>
</route>

Viewing all articles
Browse latest Browse all 5648

Trending Articles