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 » XML and write string VB.Net

Post new topic  Reply to topic
 XML and write string VB.Net « View previous topic :: View next topic » 
Author Message
klabran
PostPosted: Fri Mar 12, 2004 8:44 am    Post subject: XML and write string VB.Net Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Do you have to do anything special when reading in an xml message from a text file into a string value and then putting that to a queue using the VB.Net MQ library.

I am creating an mqmessage, setting the format to string, using writestring to add it to the mqmessage and then using the put method of a queue.

I am getting an invalid document structure error?

Grabbing the message from my dead q shows a well structured xml message???

If I use mqsiputc to put the same message it works???

My queue recieving this message is set to use the xml parser.
Back to top
View user's profile Send private message Visit poster's website
bower5932
PostPosted: Fri Mar 12, 2004 9:19 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If it works one way and not the other, run the amqsbcg program against the two messages and look for differences in the header. My guess would be something to do with what you specified for a message format.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
klabran
PostPosted: Fri Mar 12, 2004 10:12 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Thanks for the hint...

In doing this I have noticed that the message being put from .net is inserting a blank after every character???

HEX = <.C.I.T.A.T.I.O.N.S. ect....
Text = < C I T A T I O N S

The headers are identical from what I can see.

What would cause that....???
Back to top
View user's profile Send private message Visit poster's website
klabran
PostPosted: Fri Mar 12, 2004 10:51 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

If the .net string is unicode based would this cause the problem?

If so how do I change it to be ascii based?
Back to top
View user's profile Send private message Visit poster's website
brad_blackmon
PostPosted: Fri Mar 12, 2004 8:02 pm    Post subject: Reply with quote

Newbie

Joined: 04 Mar 2004
Posts: 4
Location: Washington, D.C.

Try setting the MQMessage.CharacterSet property before you call the WriteString() method. If you do nothing, will default 1200, which writes the string to the queue in unicode. However, if you set the CharacterSet property to 437 before you call the WriteString() method, it will write the string to the queue in ASCII text.

--Brad
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
klabran
PostPosted: Wed Mar 17, 2004 9:33 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Thanks Brad. That did the trick.

I feel silly.

Kevin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » XML and write string VB.Net
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.