ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » How to write files to Queue using Java APIs

Post new topic  Reply to topic
 How to write files to Queue using Java APIs « View previous topic :: View next topic » 
Author Message
rajesh_avrs
PostPosted: Mon Jan 14, 2002 11:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bduncan
PostPosted: Tue Jan 15, 2002 4:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
rajesh_avrs
PostPosted: Tue Jan 15, 2002 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bduncan
PostPosted: Thu Jan 17, 2002 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
rajesh_avrs
PostPosted: Thu Jan 17, 2002 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
StefanSievert
PostPosted: Fri Jan 18, 2002 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Fri Jan 18, 2002 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
StefanSievert
PostPosted: Fri Jan 18, 2002 3:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » How to write files to Queue using Java APIs
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.