You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rdomingo <rd...@domingo.nl> on 2009/12/21 15:33:18 UTC

Newbie: Argument and File streaming

Hello,

I'm new to camel and trying to figure out how to:
- stream a file from my client to some service (not really a problem)
- also send some parameters when sending the file, for example it's
filename, author,... (any hints ?)
- when the file is received an id should be returned to the client (any
hints ?)

thnx,
Raymond

-- 
View this message in context: http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26874773.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Newbie: Argument and File streaming

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

rdomingo wrote:
> Thank you, this is exactly what I needed.
> 
> So I found out I could add an Exchange parameter to my upload method
> and it would receive the exchange object somehow magically. I then
> could use this object to get access to the http headers. This
> completed my provider.
What kind of method are you using?
Did you use the ProducerTemplate?

> 
> And by the info you just provided I was able to verry quickly
> implement a file uploader.
> 
> I'm currently working on a proof of concept application concerning
> camel. In order to investigate if camel can help to solve some of our
> integration problems we are building some loadbalanced file clipboard.
> 
> I'm still a bit concerned about the documentation of camel. In order
> to find out how it works I have to just give it a try and see what
> happens. This is how I found out about the Exchange parameter...
> 
> Can you recommend any documentation ?
> 
Did you have a chance to look around at the http://cwiki.apache.org/CAMEL ?

And the google customer search box can help you to find the document 
that you want :)

> 
> Claus Ibsen-2 wrote:
>> Hi
>>
>> Welcome to the community.
>>
>> On Mon, Dec 21, 2009 at 3:33 PM, rdomingo <rd...@domingo.nl> wrote:
>>> Hello,
>>>
>>> I'm new to camel and trying to figure out how to:
>>> - stream a file from my client to some service (not really a problem)
>>> - also send some parameters when sending the file, for example it's
>>> filename, author,... (any hints ?)
>>> - when the file is received an id should be returned to the client (any
>>> hints ?)
>>>
>> What kind of protocols can / do you want to use?
>>
>> I assume the file content is binary, or is it text based?
>>
>> Is it a synchronous request/reply call? e.g. does the client wait
>> until the file has been fully received and an id is returned to it?
>>
>> Do you plan to use Camel on both the client and server side?
>>
>>
>> You can use plain HTTP to upload the file and have additional data in
>> there as well.
>> http://hc.apache.org/httpclient-3.x/methods/multipartpost.html
>>
>>
>>> thnx,
>>> Raymond
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26874773.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
> 

Willem

Re: Newbie: Argument and File streaming

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Dec 22, 2009 at 9:49 AM, rdomingo <rd...@domingo.nl> wrote:
>
> Thank you, this is exactly what I needed.
>
> So I found out I could add an Exchange parameter to my upload method
> and it would receive the exchange object somehow magically. I then
> could use this object to get access to the http headers. This
> completed my provider.
>
> And by the info you just provided I was able to verry quickly
> implement a file uploader.
>
> I'm currently working on a proof of concept application concerning
> camel. In order to investigate if camel can help to solve some of our
> integration problems we are building some loadbalanced file clipboard.
>
> I'm still a bit concerned about the documentation of camel. In order
> to find out how it works I have to just give it a try and see what
> happens. This is how I found out about the Exchange parameter...
>
> Can you recommend any documentation ?
>

Of course there is the camel documentation at
http://camel.apache.org/

And the tutorials
http://camel.apache.org/tutorials.html

And examples
http://camel.apache.org/examples.html

And some blogs, articles on other sites at
http://camel.apache.org/articles.html

And this thesis on Camel, although a bit old
http://elib.uni-stuttgart.de/opus/volltexte/2008/3520/pdf/STUD_2127.pdf

And then there is a book in the works (I am one of the authors)
http://www.manning.com/ibsen

And FUSE also have some additional documentation
http://fusesource.com/products/enterprise-camel/#documentation



>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> Welcome to the community.
>>
>> On Mon, Dec 21, 2009 at 3:33 PM, rdomingo <rd...@domingo.nl> wrote:
>>>
>>> Hello,
>>>
>>> I'm new to camel and trying to figure out how to:
>>> - stream a file from my client to some service (not really a problem)
>>> - also send some parameters when sending the file, for example it's
>>> filename, author,... (any hints ?)
>>> - when the file is received an id should be returned to the client (any
>>> hints ?)
>>>
>>
>> What kind of protocols can / do you want to use?
>>
>> I assume the file content is binary, or is it text based?
>>
>> Is it a synchronous request/reply call? e.g. does the client wait
>> until the file has been fully received and an id is returned to it?
>>
>> Do you plan to use Camel on both the client and server side?
>>
>>
>> You can use plain HTTP to upload the file and have additional data in
>> there as well.
>> http://hc.apache.org/httpclient-3.x/methods/multipartpost.html
>>
>>
>>> thnx,
>>> Raymond
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26874773.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26885383.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Newbie: Argument and File streaming

Posted by rdomingo <rd...@domingo.nl>.
Thank you, this is exactly what I needed.

So I found out I could add an Exchange parameter to my upload method
and it would receive the exchange object somehow magically. I then
could use this object to get access to the http headers. This
completed my provider.

And by the info you just provided I was able to verry quickly
implement a file uploader.

I'm currently working on a proof of concept application concerning
camel. In order to investigate if camel can help to solve some of our
integration problems we are building some loadbalanced file clipboard.

I'm still a bit concerned about the documentation of camel. In order
to find out how it works I have to just give it a try and see what
happens. This is how I found out about the Exchange parameter...

Can you recommend any documentation ?


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Welcome to the community.
> 
> On Mon, Dec 21, 2009 at 3:33 PM, rdomingo <rd...@domingo.nl> wrote:
>>
>> Hello,
>>
>> I'm new to camel and trying to figure out how to:
>> - stream a file from my client to some service (not really a problem)
>> - also send some parameters when sending the file, for example it's
>> filename, author,... (any hints ?)
>> - when the file is received an id should be returned to the client (any
>> hints ?)
>>
> 
> What kind of protocols can / do you want to use?
> 
> I assume the file content is binary, or is it text based?
> 
> Is it a synchronous request/reply call? e.g. does the client wait
> until the file has been fully received and an id is returned to it?
> 
> Do you plan to use Camel on both the client and server side?
> 
> 
> You can use plain HTTP to upload the file and have additional data in
> there as well.
> http://hc.apache.org/httpclient-3.x/methods/multipartpost.html
> 
> 
>> thnx,
>> Raymond
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26874773.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26885383.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Newbie: Argument and File streaming

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Welcome to the community.

On Mon, Dec 21, 2009 at 3:33 PM, rdomingo <rd...@domingo.nl> wrote:
>
> Hello,
>
> I'm new to camel and trying to figure out how to:
> - stream a file from my client to some service (not really a problem)
> - also send some parameters when sending the file, for example it's
> filename, author,... (any hints ?)
> - when the file is received an id should be returned to the client (any
> hints ?)
>

What kind of protocols can / do you want to use?

I assume the file content is binary, or is it text based?

Is it a synchronous request/reply call? e.g. does the client wait
until the file has been fully received and an id is returned to it?

Do you plan to use Camel on both the client and server side?


You can use plain HTTP to upload the file and have additional data in
there as well.
http://hc.apache.org/httpclient-3.x/methods/multipartpost.html


> thnx,
> Raymond
>
> --
> View this message in context: http://old.nabble.com/Newbie%3A-Argument-and-File-streaming-tp26874773p26874773.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus