send/receive XMLDocument via MSMQ

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to send & receive XML Document Objects via the Message Queue.

We have several applications that insert XML Document Object into the
message queue. This works with no problem. I am trying to write an async
MSMQ listener that will handle these XML Document Objects. No matter what i
seem to try i keep getting various errors.

So, how do i get an XML Document Object back out of the Message Queue.

Thanks

Eric.
 
You need to make sure both sides are using the same message queue formatter -
bonary, xml or activex.

You should be able to send and receive xml documents by storing them in the
Body property of the message. On the receiving side you should be able to use:

XmlDocument doc = (XmlDocument)message.Body;

You could also try setting the BodyType property in the sender.

Unfortunately I do not have MQ installed on my machine, so I cannot provide
concrete examples. Working from memory.

If you continue to have problems, please post the exceptions you are getting
as well. There is also an MQ new group which is useful.

HTH
Dan
 
Back
Top