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 » NULL value in message

Post new topic  Reply to topic
 NULL value in message « View previous topic :: View next topic » 
Author Message
Vinay15
PostPosted: Wed Oct 11, 2006 6:01 am    Post subject: NULL value in message Reply with quote

Newbie

Joined: 11 Oct 2006
Posts: 6
Location: UK

I am using amqmdnet.dll to put message on Queue.

Dim ConnProperties As Hashtable = New Hashtable

ConnProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType)
ConnProperties.Add(MQC.HOST_NAME_PROPERTY, strPortname)
ConnProperties.Add(MQC.CHANNEL_PROPERTY, strChannelname)

oMQQueueManager = New MQQueueManager(sQueueManager, ConnProperties)

openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING
oMQQueue = oMQQueueManager.AccessQueue(sQueue, openOptions)

Dim oMQMessage As MQMessage = New MQMessage

oMQMessage.Format = MQC.MQFMT_STRING
oMQMessage.WriteString(xmlPayload.OuterXml)

Dim oMQ_PMO As MQPutMessageOptions = New MQPutMessageOptions
oMQQueue.Put(oMQMessage, oMQ_PMO)

It works but puts null values after every character in Queue. e.g. <.?.x.m.l. .v.e.r.s.i.o.n.=.".1..0.".?.>. like this. What should I modify in code to correct this?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 11, 2006 6:34 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Those aren't NULL characters.

You're putting Unicode text.

Unicode is a double-byte character set.

Try searching here for all the other people who have had the exact same problem.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vinay15
PostPosted: Fri Oct 13, 2006 12:58 am    Post subject: Reply with quote

Newbie

Joined: 11 Oct 2006
Posts: 6
Location: UK

I am new for MQ. Please be specific so as I can resolve this
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 13, 2006 1:09 am    Post subject: Reply with quote

Grand High Poobah

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

Vinay15 wrote:
I am new for MQ. Please be specific so as I can resolve this



jefflowrey wrote:
Try searching here for all the other people who have had the exact same problem


That's about as specific as you get!

1 quick search (using the link kindly provided at the top of the page) revealed this:

http://www.mqseries.net/phpBB2/viewtopic.php?t=31911&highlight=unicode

Not the only example, nor the best, and offered without recommendation or endorsement as the kind of information available in the forum free for the looking.

Also Unicode has nothing per se to do with MQ but is a more general concept, highly used in .NET. You might want to do a bit of research before further coding
_________________
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 » IBM MQ API Support » NULL value in 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.