camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cephy <>
Subject Help using CXFRS client proxy to call RESTful services
Date Tue, 11 Sep 2012 10:44:12 GMT
Hi guys,

I am relatively new to Camel - yet most aspects have gone rather well so far
However, I need some help with the "client proxy" method to call a CXFRS
producer using camel 2.9.0

I have coded a class model with appropriate annotations and declared the
services in Blueprint XML as listed at end of this post. It all works
perfectly, serving up RESTful services that I can call with SoapUI.

Now I want a camel processor to call one of the exposed RESTful services
using the "client proxy" method.
I have read the documentation for the CXFRS component
( under "How to invoke the REST service
through camel-cxfrs producer".  However, I cannot see how I apply the given
example to calling my services as a camel producer.

I've tried adapting the "client proxy" example to my case:

	ProducerTemplate template = context.createProducerTemplate();
	Exchange exchange = template.send("cxfrs:bean:myServer", new Processor() {
		...follow the example...
	MyOperationResuly result =
...however this doesn't call the service, and all I get is a null result.

I can successfully call the service directly using the following code...

	MyService service =
	MyOperationResult result =

How do I actually call my services using the CXFRS "client proxy" method??

Maybe I have to do more in my Blueprint config file??
I've seen Spring config files using both cxf:rsServer and cxf:rsClient
declarations - but I haven't seen an equivalent Blueprint example.

Any assistance to get me back on track would be most appreciated.



My blueprint.xml file:

<?xml version="1.0" encoding="UTF-8"?>
	xsi:schemaLocation="" >

		address="/MyService" >
			<bean class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" />
			<ref component-id="myService" />
	<bean id="myService" class="" />

	<camelContext xmlns=""
id="my-camel-context" >
		<routeBuilder ref="myServiceRouteBuilder" />
	<bean id="myServiceRouteBuilder" class="" />


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message