Author |
Message
|
rajesh_avrs |
Posted: Mon Jan 14, 2002 11:29 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2001 Posts: 31
|
I have a requirement where I need to send an XML file over MQSeries. How do I achieve this using Java APIs?
_________________ ****************
MQSeries is cool
**************** |
|
Back to top |
|
 |
bduncan |
Posted: Tue Jan 15, 2002 4:49 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Rajesh,
Look at this thread:
http://www.mqseries.net/phpBB/viewtopic.php?topic=265&forum=12
Basically, you should have no problem sending XML via MQSeries. Especially in Java, as you simply need to get the XML in the form of a String object, and pass this as the message body when you construct an MQSeries message object.
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
rajesh_avrs |
Posted: Tue Jan 15, 2002 8:41 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2001 Posts: 31
|
Thanks for the reply,
But my requirement is that my application has to read a file from some directory and need to send it across. The other side wishes to receive it like a file rather than a string.
_________________ ****************
MQSeries is cool
**************** |
|
Back to top |
|
 |
bduncan |
Posted: Thu Jan 17, 2002 2:31 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Rajesh,
You have a couple of options. Either you programatically turn the XML file into a message or messages and rebuild the file on the other end. One way of doing this is using message groups. The first message in the group would contain information necessary to rebuild the file, like the filename, size, ownership, etc.., and each message that follows would be part of the file. For instance, if I have a 50K XML file, I could break it into 16K chunks (or anything you prefer) which would result in 5 messages. The first message, followed by 16K, 16K, 16K, and 2K. The other side could rebuild the file.
Or, you can use reference messages. These basically act as an MQSeries FTP wrapper. It lets you specify a file on the local machine, and when you place the message to the queue, the queue manager will handle transferring the actual file to the other side. The receiving queue manager will save the file to disk, just like it got FTP'd across.
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
rajesh_avrs |
Posted: Thu Jan 17, 2002 8:34 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2001 Posts: 31
|
Second option sounds very intersting. Do you have idea as to how to achieve this?
Thanks for the prompt reply. |
|
Back to top |
|
 |
StefanSievert |
Posted: Fri Jan 18, 2002 12:10 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
How about Chapter 31 of the MQSeries Application Programming Guide subsection "The Reference Message Sample Programs"?
_________________ Stefan Sievert
IBM Certified * WebSphere MQ |
|
Back to top |
|
 |
bduncan |
Posted: Fri Jan 18, 2002 2:09 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
You took the words right out of my mouth Stefan
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
StefanSievert |
Posted: Fri Jan 18, 2002 3:28 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
Hi Brandon,
gosh, now I have that Jim Steinman (sung by Meat Loaf) song in my head.
Have a great weekend!
Stefan
[ This Message was edited by: StefanSievert on 2002-01-18 15:28 ] |
|
Back to top |
|
 |
|