XML msg posted to msmq getting corrupted
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Applications Integration > XML msg posted to msmq getting corrupted




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    XML msg posted to msmq getting corrupted  
Jay Yanko


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-20-04 08: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) ;
>
>.
>





[ Post a follow-up to this message ]



    RE: XML msg posted to msmq getting corrupted  
Iuliu Rus


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-26-04 04:38 AM

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);






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:37 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register