camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RR <>
Subject RestFul Services using CAMEL
Date Sun, 08 Apr 2012 01:14:05 GMT
I am a newbie to CAMEL. Pardon me if this is a so naive.

Our users are going to call a REST webservice that's going to load a very
big XML file and respond back only a portion of the XML. I came across
tokenizeXML() in Splitter EAI pattern and played around a bit and works
great stand-alone. 

But I am not able to implement this while try to integrate with CXF

In my beans.xml I have,

<bean id="demoService" name="demoService" class="com.hrb.demo.DemoService">
<jaxrs:server id="demo" address="/demo">
		<ref bean="demoService" />

<cxf:rsServer id="myServer" address="/demo"
		serviceClass="com.hrb.demo.DemoService" />

<camelContext id="mycamelContext"

and I want my Routerclass to process the request by loading the XML using
split(), tokenizeXML() and streaming() and send the response back.

from("cxfrs://bean:myServer"). process(new Processor() {
			public void process(Exchange arg0) throws Exception {
                             //THE FILE order.dat is compressed..
				File file = new File(
				ZipFile zipfile = new ZipFile(file);
				Enumeration e = zipfile.entries();
				ZipEntry entry = null;
				while (e.hasMoreElements()) {
					entry = (ZipEntry) e.nextElement();
                         // I WANT TO SEND THIS STREAM TO THE NEXT
		}).split().tokenizeXML("Order").streaming().process(new Processor() {

                            // IF THE TOKENIZED STRING IS EQUAL TO CERTAIN
                           // I WANT TO SET THE RESPONSE FOR REST SERVICE.


I dont know whether it's possbile to do this way via CAMEL. Any help is
greatly appreciated.


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

View raw message