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 » Getting message as a file.

Post new topic  Reply to topic
 Getting message as a file. « View previous topic :: View next topic » 
Author Message
rajpath
PostPosted: Tue Jun 18, 2002 10:21 pm    Post subject: Getting message as a file. Reply with quote

Novice

Joined: 12 Jun 2002
Posts: 12
Location: Mumbai

Hello friends
I am working on MQSeries with Java and am comfortable with the same.
If I put the message on the queue as File object through java can I get or retreive it through C or Visual Basic application??
I tried out with the built in programs with MQSeries but the entire picture is bit unclear about how to get file objects from VB or C?
The sample code specifies about putting and getting strings i.e.simple text but not files.
Can u please support 4 the same.
_________________
Raj
Software Engineer
Mahindra Consulting Ltd
Mumbai-101 India
Back to top
View user's profile Send private message Yahoo Messenger
bduncan
PostPosted: Wed Jun 19, 2002 9:32 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Raj,
There is no problem moving files around in MQSeries, even when you are using different programming languages on each end. However, I would recommend reading the file into Java as a binary stream, and then putting this into your message, rather than letting Java serialize the File object. This way, when your C or VB program receives the message, it can simply write the bytes to file, one by one.
I haven't done Java to C or VB, but I have done Perl to C, where the Perl program was reading a file from disk, sending it as a message to a queue where a C program would pick it up and reconstruct the file.
_________________
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
MillsPerry
PostPosted: Fri Jun 21, 2002 12:28 pm    Post subject: Java File Class In Message Reply with quote

Acolyte

Joined: 08 Oct 2001
Posts: 59
Location: ZyQuest, inc.

The problem with putting a Java file object into a message is that it would only be useable to another Java program. Other languages, such as Visual Basic or C++, don't have access to Java's object structure. Would it be possible to serialize the file object into an XML structure?
Back to top
View user's profile Send private message Send e-mail
bduncan
PostPosted: Fri Jun 21, 2002 1:14 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

It's relatively straightforward to pass the File object into a FileReader, and by using the read() method, you can get the file contents into a character array, which can be placed in an MQSeries message. VB and C provide similar methods/functions to do the inverse operation on the other side...
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Getting message as a file.
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.