|
 |
aspx thread: How to send Xmldom object to MSMQ in .Net?
Message #1 by "Uma Maheswari" <maheswarim@r...> on 12 Feb 2001 10:54:52 -0000
|
|
hi,
Actually I have written a Service in C# in which I am trying to store an
xml document in MSMQ. I tried the following code:
---------------------------------------------------------
MSXML2.DOMDocument dom = new MSXML2.DOMDocument();
MSXML2.IXMLDOMNode root = dom.createNode(1,"name","http://temp");
dom.appendChild(root);
dom.save("c:\\document.xml");
MessageQueue myq = new MessageQueue();
myq.Path = "muma\\Private$\\SoapPayloads";
myq.Formatter = new ActiveXMessageFormatter();
System.Messaging.IMessageFormatter frmt = new System.Messaging.ActiveXMessageFormatter();
// ~~~~~~~~~ Errorneous line ~~~~~~~~~~~
System.Messaging.Message msg = new System.Messaging.Message(dom,frmt);
myq.Send(msg);
---------------------------------------------------------
The above code compiles successfully.error. But when viewing in the
Browser I am getting the following error:
----------------
System.InvalidOperationException: The object cannot be serialized because
its type is not supported.
----------------
The problem is with serializing the Microsoft.XMLDOM
object I think.
So, how to serialize the Microsoft.XMLDOM object so
that it can be stored in MSMQ.
Could any of you kindly help me to get away
from this problem?
Thank You,
With Regards,
Uma
Message #2 by Norberto Goussies <norberto.goussies@c...> on Mon, 12 Feb 2001 10:28:47 -0300
|
|
Hi, Uma:
In order to serialize, the Microsoft.XMLDOM must implement an especial
Interface, be sure that it implement it, if not you can try making your own
Gaucho.XMLDOM that has as base class Microsoft.XMLDOM and also implements
that interface.
-----Mensaje original-----
De: Uma Maheswari [mailto:maheswarim@r...]
Enviado el: lunes 12 de febrero de 2001 7:55
Para: ASP+
CC: maheswarim@c...
Asunto: [aspx] How to send Xmldom object to MSMQ in .Net?
hi,
Actually I have written a Service in C# in which I am trying to store an
xml document in MSMQ. I tried the following code:
---------------------------------------------------------
MSXML2.DOMDocument dom = new MSXML2.DOMDocument();
MSXML2.IXMLDOMNode root = dom.createNode(1,"name","http://temp");
dom.appendChild(root);
dom.save("c:\\document.xml");
MessageQueue myq = new MessageQueue();
myq.Path = "muma\\Private$\\SoapPayloads";
myq.Formatter = new ActiveXMessageFormatter();
System.Messaging.IMessageFormatter frmt = new
System.Messaging.ActiveXMessageFormatter();
// ~~~~~~~~~ Errorneous line ~~~~~~~~~~~
System.Messaging.Message msg = new System.Messaging.Message(dom,frmt);
myq.Send(msg);
---------------------------------------------------------
The above code compiles successfully.error. But when viewing in the
Browser I am getting the following error:
----------------
System.InvalidOperationException: The object cannot be serialized because
its type is not supported.
----------------
The problem is with serializing the Microsoft.XMLDOM
object I think.
So, how to serialize the Microsoft.XMLDOM object so
that it can be stored in MSMQ.
Could any of you kindly help me to get away
from this problem?
Thank You,
With Regards,
Uma
|
|
 |