Hi,
I am trying to use the following code to send data over a Message
Queue. The following error is being given:
"An unhandled exception of type 'System.InvalidOperationException'
occurred in system.xml.dll
Additional information: There was an error generating the XML
document."
Can someone help me solve the problem out.
Thanks in Advance
** Code **
MessageQueueCommunication m = new MessageQueueCommunication("myPath");
CommunicationUnit cu = new CommunicationUnit(m, "Test");
MessageQueue mq = new MessageQueue(myPath);
mq.Send(cu);
public abstract class ICommunicationTuple
{
public ICommunicationTuple(){}
}
public class MessageQueueCommunication : ICommunicationTuple
{
private string msgQueuePath;
public MessageQueueCommunication(){}
public MessageQueueCommunication(string messageQueuePath)
{
MessageQueuePath = messageQueuePath;
}
public string MessageQueuePath
{
set { msgQueuePath = value;}
get { return msgQueuePath; }
}
}
public class CommunicationUnit
{
private ICommunicationTuple communicationTuple;
private string communicationType;
public CommunicationUnit(){}
public CommunicationUnit(ICommunicationTuple commTuple, string
commType)
{
CommunicationTuple = commTuple;
CommunicationType = commType;
}
public ICommunicationTuple CommunicationTuple
{
get { return communicationTuple; }
set { communicationTuple = value; }
}
public string CommunicationType
{
set { communicationType = value; }
get { return communicationType; }
}