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 » General IBM MQ Support » Sending Objects on MQ Message

Post new topic  Reply to topic
 Sending Objects on MQ Message « View previous topic :: View next topic » 
Author Message
rajuarien
PostPosted: Tue Apr 07, 2009 2:51 am    Post subject: Sending Objects on MQ Message Reply with quote

Newbie

Joined: 24 Mar 2009
Posts: 5

Hi,

I am working on IBM MQ Series 7.0. How would i be able to send and receive C# objects in the message.

Can you please send me some code snippets, since this is the first time i am using it.

Thanks
Rajaraman.S
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Apr 07, 2009 3:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You write C# code to marshall the data in the object into XML, and you write the XML to the message.

Then you write C# code to read the XML from the message and you unmarshal the data in the XML into your object.

Writing raw objects of any flavor - Java, C#, perl, Ruby, etc. - directly into a distributed messaging provider that will almost certainly move messages to other machines and other platforms that may or may not even be read by apps that are not in your language is not a good idea.

Even if you know for a fact that every single application that will ever read your messages is running in C#, you should not rely on those applications being at a compatible level of C# that can actually handle your raw object messages - because they're running at different versions of .NET, because they're running different versions of the same classes, and etc.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 07, 2009 3:01 am    Post subject: Re: Sending Objects on MQ Message Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rajuarien wrote:
I am working on IBM MQ Series 7.0. How would i be able to send and receive C# objects in the message.


Copy them to the message buffer using a method & format of your choice.

rajuarien wrote:
Can you please send me some code snippets, since this is the first time i am using it.


You'll observe a samples folder included with your WMQ install; if not, install the samples from the delivery media. You'll also notice a link at the top of this page maked "Sample Code" which might be useful.....


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 07, 2009 3:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jeff said it all!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Apr 07, 2009 3:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fjb_saper wrote:
Jeff said it all!


Except he was kinder than me and went into more detail.....
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » General IBM MQ Support » Sending Objects on MQ Message
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.