|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Putting a number as a message |
« View previous topic :: View next topic » |
Author |
Message
|
nNumber |
Posted: Tue Feb 17, 2009 5:41 am Post subject: Putting a number as a message |
|
|
Newbie
Joined: 17 Feb 2009 Posts: 2
|
Hello,
I'm trying to do a basic put\get program in c\c++ as a client and get\put program in java, and need to put an integer message in the queue (in the client prog). What I did so far is used itoa() to transform the number to char*, however that isn't good for me since the server app uses readInt (java), and reads the integer values of the chars.
Is there an easy way i can send the int as a message? (converting etc...). If not at the client side, is there something i can do in the server side? (I rather change the client than the server).
I'll appreciate any help given.
Me. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 17, 2009 5:49 am Post subject: Re: Putting a number as a message |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nNumber wrote: |
What I did so far is used itoa() to transform the number to char*, however that isn't good for me since the server app uses readInt (java), and reads the integer values of the chars. |
Why? If the receiving application wants an integer value, why not send an integer value?
nNumber wrote: |
Is there an easy way i can send the int as a message? |
Look up the convert options supplied by the product. They're in the infocentre. Be aware WMQ works on the general principle "receiver makes good".
FWIW most numbers tend to be sent as numeric character because it's easier to read by humans when you're problem solving, it's easier to explain to management code page translation than it is to explain endlian incompatibility and you're not charged for bandwidth these days! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nNumber |
Posted: Tue Feb 17, 2009 6:22 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2009 Posts: 2
|
Thank you very much, i got it working...
Ciao  |
|
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
|
|
|
|