all groups > dotnet remoting > june 2006 >
You're in the

dotnet remoting

group:

Sending/Receiving XML document to/from MSMQ


Sending/Receiving XML document to/from MSMQ basulasz
6/20/2006 6:40:02 AM
dotnet remoting:
I add an XML file as an MSMQ Message to MSMQ with the code

XmlDocument myXml = new XmlDocument();
myXml.Load("C:\\Emp.xml");

MessageQueueTransaction mqTrans = new MessageQueueTransaction();
MessageQueue mq = new MessageQueue();
try
{
mq.Path = @"BASULAS\mqsms";
mq.DefaultPropertiesToSend.Recoverable = true;
mqTrans.Begin();
mq.Send((object)myXml.InnerXml.ToString(), "msgXml",
MessageQueueTransactionType.Single);
mqTrans.Commit();
}
catch (MessageQueueException ex)
{
mqTrans.Abort();
mq.Close();
throw ex;
}

I want to get this message and convert it to an XML file again. But i could
Re: Sending/Receiving XML document to/from MSMQ Tim Van Wassenhove
6/20/2006 2:30:08 PM
[quoted text, click to view]

You didn't show code that tries to generate an XmlDocument from your XML
string in the MQ...

Assuming that i understood what you're trying to do:
(1) fetch data from MQ into String.
(2) Use the LoadXml function from XmlDocument.


--
Met vriendelijke groeten,
Re: Sending/Receiving XML document to/from MSMQ basulasz
6/20/2006 11:29:02 PM


[quoted text, click to view]

Yes this is what i need. I am now familiar with xml and serialization and
these concepts. Is this the way how the seralization is used? Or is it
AddThis Social Bookmark Button