Author |
Message
|
IBM_Newbie |
Posted: Mon Jan 09, 2012 3:33 am Post subject: File upload using HTTP protocol |
|
|
Novice
Joined: 05 Dec 2011 Posts: 15
|
Hi,
We have a requirement that we need to upload a file using message broker+ HTTP protocol.
Is there any out of the box functionality or pattern available?
Is there a way that we dont use JavaCompute node(basically java code) and do this?
Thanks in advance for help. |
|
Back to top |
|
 |
zpat |
Posted: Mon Jan 09, 2012 3:53 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
File transfer is not built in to http. So it depends on what is at the other end of this connection and what format they want in their http content.
You might be able to then send this http data with the httprequest node.
The best bet to is use a web service or a soap request.
Last edited by zpat on Mon Jan 09, 2012 3:56 am; edited 1 time in total |
|
Back to top |
|
 |
IBM_Newbie |
Posted: Mon Jan 09, 2012 3:55 am Post subject: |
|
|
Novice
Joined: 05 Dec 2011 Posts: 15
|
the data is media file which can be mp3, movie etc.
We need to upload full contents of this |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Jan 09, 2012 4:20 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
Can you describe your business requirement with more details? If so the experienced ones can lead you better to the correct solution / architecture.
--
marko |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jan 09, 2012 4:22 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
IBM_Newbie wrote: |
the data is media file which can be mp3, movie etc.
We need to upload full contents of this |
The content of the data does not matter at this point in the discussion.
My guess is that you are loading content into a media server.
If the content can be loaded using an HTTP Post then broker can do it.
But your post does not say where the content is coming from.
Care to enlighten us? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 09, 2012 5:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
IBM_Newbie wrote: |
the data is media file which can be mp3, movie etc.
We need to upload full contents of this |
The content is secondary to the question.
WMB supports a full range of http scenarios and commands.
So however you'd do this outside WMB (or with a JCN) should be possible with the standard nodes.
But this does depend on how badly you've had to bend the http standard to get file support into it. Most people use ftp rather than http to move files over tcp/ip. I'm just sayin'... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
IBM_Newbie |
Posted: Tue Jan 10, 2012 7:17 pm Post subject: |
|
|
Novice
Joined: 05 Dec 2011 Posts: 15
|
The scenario is we are getting file details with URL embedded in that attachment src in SOAP request as attachment.
We have to hit the URL and get the file contents which is being done via HTTPRequest GET.
Now we need to post that file contents (upload) to another server using HTTP only.We thought of posting a BLOB but client wants a file and that to in readable format(the format in which it was lying on that URL) |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 10, 2012 9:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
IBM_Newbie wrote: |
The scenario is we are getting file details with URL embedded in that attachment src in SOAP request as attachment.
We have to hit the URL and get the file contents which is being done via HTTPRequest GET.
Now we need to post that file contents (upload) to another server using HTTP only.We thought of posting a BLOB but client wants a file and that to in readable format(the format in which it was lying on that URL) |
I would have thought a BLOB would do it. However you might also have to pass the httpheader you received while getting the file... or the Properties set while doing the httpget...
By any chance is the CCSID of the target different from the CCSID of the source?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
antonpiatek |
Posted: Mon Jan 16, 2012 12:52 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2007 Posts: 5 Location: Hursley, UK
|
My first though is is that broker is sending the data correctly, but your http server doesn't know what to do with it - perhaps you are missing a header to describe the contents correctly?
Are you doing a HTTP POST or a PUT? |
|
Back to top |
|
 |
|