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 Java / JMS » how to transmit the XML file in the MQ?

Post new topic  Reply to topic
 how to transmit the XML file in the MQ? « View previous topic :: View next topic » 
Author Message
qizhirui
PostPosted: Wed Jul 19, 2006 8:20 am    Post subject: how to transmit the XML file in the MQ? Reply with quote

Novice

Joined: 24 Jun 2006
Posts: 14

because of the project need , i need the contact admin us to transmit the XML file. You may give me some hints that : read the XML file and put the content that have been readed as a message into the queue.But i have a problem that when i retrieve the message how can i make the XML file from the message?
i have founded some materials about these in the internet , as flows:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/csq034g.htm
but the MQ is fresh to me ,i can't understand it completely.
please give me some hint.
wait for your news.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
bower5932
PostPosted: Wed Jul 19, 2006 8:24 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

When you retrieve the message, it will be into a buffer. You can then write this buffer out to a file and you should have your XML file back.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
qizhirui
PostPosted: Wed Jul 19, 2006 8:39 am    Post subject: Reply with quote

Novice

Joined: 24 Jun 2006
Posts: 14

thanks your reply,i know what you said ,but i have a problem that ,when use the buffer to as a middleware to write XML file, but i need to get some details about the message and the XML files such as the message length and format. i give a simple XML file as follows:
<PACKAGE>
<LENGTH>1.1</LENGTH>
<WIDTH>0.9</WIDTH>
<HEIGHT>0.4</HEIGHT>
<WEIGHT>0.3</WEIGHT>
<EPC>this is unknown</EPC>
</PACKAGE>
i put the whole file as a message into the queue, not only one line as a message into the queue .if choose the latter , it is easy to constitue the XML as i wanted ,but if the first ,i have a difficulty.
when i want to transmit this file with MQ , I need to read this file every line to constitue a binarybyte flow and then with the MQ API PUT message to complish it ,but when i retrieve the message ,how to get the the file format as above.please give me more details
Back to top
View user's profile Send private message Send e-mail MSN Messenger
bower5932
PostPosted: Wed Jul 19, 2006 9:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

When you issue the MQGET call, you'll get back a pointer to the data and a length of the data. You should be able to use these two output parameters as input to a file writing routine.

WMQ doesn't care about what your data is. It simply puts it onto a queue and then gets it off of a queue.

As far as whether or not to write the file onto the queue a line at a time or as one whole file, that will depend. It is definitely easier to write the entire file. However, if the files get large, you may run into other problems with 'large messages' (which are actually being discussed in another active thread).
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » how to transmit the XML file in the MQ?
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.