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 » WebSphere Message Broker (ACE) Support » Flow dosen't understand XML file written by C# application..

Post new topic  Reply to topic
 Flow dosen't understand XML file written by C# application.. « View previous topic :: View next topic » 
Author Message
gotiashvili
PostPosted: Tue May 27, 2008 5:34 am    Post subject: Flow dosen't understand XML file written by C# application.. Reply with quote

Newbie

Joined: 02 Apr 2008
Posts: 8

Hello

I have C# application. I want to write XML string in a Queue.
Here is my C# code:

MQQueueManager mqQMgr;
MQQueue mqQueue1;
MQMessage mqMsg1;
MQPutMessageOptions mqPutMsgOpts;

mqQMgr = new MQQueueManager("QM1");
mqQueue1 = mqQMgr.AccessQueue("LMB_INSERT",MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
mqMsg1 = new MQMessage();
mqMsg1.WriteString(this.MessagetextBox.Text);
mqMsg1.Format = MQC.MQFMT_STRING;

mqPutMsgOpts = new MQPutMessageOptions();
mqQueue1.Put(mqMsg1, mqPutMsgOpts);

I'm trying to put a simple XML message.
For example:
<XMLRoot>
<a>aaa</a>
</XMLRoot>

This message is succesfuly written in a Queue but Message broker couldn't understand that this is XML format. When I debug this flow I have this error:

Message
Properties
MQMD
XMLNS
XML Parsing Errors have occurred


Then I've terminated debuging and got the message with rfhutil.exe.
There was the same XML witch I wrote from C#.
Then I put the same message with rfhutil.exe and everything is ok.

Can anyone tell me why Message Flow couldn't understend XML message written by C# app ??

Thanks in advance.
Back to top
View user's profile Send private message
yaakovd
PostPosted: Tue May 27, 2008 6:52 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

Try to check HEX using RFH Util - it must be some special character (e.g. x'00') at the end of your xml
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue May 27, 2008 10:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Can anyone tell me why Message Flow couldn't understend XML message written by C# app
The error message will probably tell you, once you work out how to find it
Disconnect the debugger and either
a) look in the system log
b) look at the ExceptionList tree
c) take a user trace
Any of those will show you the full text of the error.
Back to top
View user's profile Send private message
kirank
PostPosted: Tue May 27, 2008 1:33 pm    Post subject: Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 136
Location: California

I had similar experience recently for a C# application. Check if the CCSID is being set to 1208 in C# program. That was the issue in my case.

Regards

Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 27, 2008 6:41 pm    Post subject: Reply with quote

Grand High Poobah

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

.NET by default writes in Unicode ( CCSID 1200). So you would have to set the CCSID on the message or use the corresponding .NET System method to transform the String into ASCII before writing it to the message. The default CCSID of the platform (and the qmgr?) of 437 would then be fine.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gotiashvili
PostPosted: Wed May 28, 2008 12:48 am    Post subject: Reply with quote

Newbie

Joined: 02 Apr 2008
Posts: 8

Thank you for your responses.
I've only changed
mqMsg1.WriteString(this.MessagetextBox.Text);
to
mqMsg1.WriteBytes(this.MessagetextBox.Text);
and it helped.

Thanks
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 » WebSphere Message Broker (ACE) Support » Flow dosen't understand XML file written by C# application..
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.