camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stpdave <da...@stpenable.com>
Subject So many options, which to chose
Date Sun, 02 Sep 2007 20:12:26 GMT

Hi,

The problem I first want to solve with Camel is this:
My servlet based application produces a file with a set of arguments in it.
Like so
arg1,arg2,argN
I want to pick up this file content, and append it to the end of a http url,
like so
http://www.example.com/cgi/getres?arg1,arg2,argN
using POST.
The http server response is a set of data I want to write to a file.

I already have a client class I used to use with Mule (yes I am a refugee).
It encapsulates an endpoint uri, whether there is a return payload, whether
it is syncronous and another piece of String data. I can change this but for
the moment prefer not to, just reuse it with Camel.

The problem I have is I am spoilt for choice with Camel in the number of
options I have to achieve this end. so if someone can advise on the optimum
approach I will give it a whirl.

My current thinking is I can use the uri method of adding components I need.
Then store the routing in the spare String object in my current client class
as Groovy script.

I am a little uncertain of the way these components are strung together. I
would guess like this:
from("file://test").to("http://www.example.com/cgi/getres?"+outputFromFileAsString).to("file://outputfile");
but am not sure how you get the content of the source file into a string.
Also whether the return from the http POST can automatically be mapped into
the outputfile via a file endpoint.

I realise my ideas are still abstract at this stage so help in making them
real is much appreciated.

Thx.

David
-- 
View this message in context: http://www.nabble.com/So-many-options%2C-which-to-chose-tf4369068s22882.html#a12452890
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message