camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Web server in ServiceMix with camel-jetty or camel-servlet
Date Sat, 22 Jun 2013 16:54:32 GMT
Hi

You can save the content to a file with

from("jetty:http://localhost:{{port}}/myapp/myservice")
// save the content to this dir
.to("file:some-dir-name-here");
// after saving to file, then set an empty body as the response to the
http client
.transform(constant(""));



On Thu, Jun 20, 2013 at 2:17 PM, cristisor <cristisor_ac@yahoo.com> wrote:
> Hello,
>
> We are trying to send blob messages (large files) through an ActiveMQ broker
> integrated in ServiceMix. It seems that this operation requires a ftp or a
> http server for upload and download and we are wondering if this can be
> achieved with a servicemix camel component implementation. I am looking over
> the camel-jetty and camel-http components but my main problem is that what I
> actually need is for the implementation of the HTTP PUT method to be the
> default one, so that it can write the uploaded file on the disk and read it
> afterwards.
>
> I see something like this in camel:jetty:
> from("jetty:http://localhost:{{port}}/myapp/myservice").process(new
> MyBookService());
>
> This would sound great for a GET or POST request, but for the PUT request I
> would have to implement the standard mechanism of the HTTP PUT method again.
>
> So, is there a way to route from a jetty endpoint, like the one above, to
> some "magic" endpoint that basically does the standard HTTP PUT function and
> saves the file on the server?
>
> Or maybe the camel:http could do this? Please look at the versions that I'm
> using also.
>
> ActiveMQ version: 5.4.0-fuse-00-00
> ServiceMix version: 3.5.0-fuse-00-00
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Web-server-in-ServiceMix-with-camel-jetty-or-camel-servlet-tp5734439.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message