|
Home > Archive > BizTalk Server Applications Integration > May 2004 > XML msg posted to msmq getting corrupted
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML msg posted to msmq getting corrupted
|
|
| Jay Yanko 2004-02-20, 3:37 am |
| Check this out:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnbda/html/bdadotnetasync1.asp
Using a formatter may solve your problem.
-J
>-----Original Message-----
>Hello,
>
>I have a .NET based AIC that posts an XML string to an
>msmq queue. I set msmq to audit/log the message, and
when
>I look at it the original XML is corrupted as follows:
>the xml "<" and ">" tags are escaped to "<" and ">",
>and the xml is wrapped with an outer "<?xml
version="1.0"?
>
>Why is msmq doing this?? Here is the C# code I'm using
to
>post to the private msmq queue:
>
>System.Messaging.MessageQueue mq =
> new System.Messaging.MessageQueue (strQueueName);
>
>// Send string
>mq.Send(strMessage, strLabel,
>
System.Messaging.MessageQueueTransactionType.Single) ;
>
>.
>
| |
| Iuliu Rus 2004-05-25, 11:38 pm |
| System.Messaging is doing that, not MSMQ. Try to send it like this:
MessageQueue mq = new MessageQueue(textBoxAddr.Text);
System.Messaging.Message msg = new System.Messaging.Message();
msg.Label = "TestMessageLabel";
// Uncomment this line if you want to send authenticated messages.
// You need to be a part of domain for that
// msg.UseAuthentication = true;
StreamWriter wr = new
StreamWriter(msg.BodyStream,System.Text.Encoding.ASCII);
wr.Write(textBoxBody.Text);
wr.Flush();
mq.Send(msg,MessageQueueTransactionType.Single);
|
|
|
|
|