|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Sending Objects on MQ Message |
« View previous topic :: View next topic » |
Author |
Message
|
rajuarien |
Posted: Tue Apr 07, 2009 2:51 am Post subject: Sending Objects on MQ Message |
|
|
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 |
|
 |
mqjeff |
Posted: Tue Apr 07, 2009 3:00 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue Apr 07, 2009 3:01 am Post subject: Re: Sending Objects on MQ Message |
|
|
 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 |
|
 |
fjb_saper |
Posted: Tue Apr 07, 2009 3:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Jeff said it all!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 07, 2009 3:38 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|