R
Rotsey
Hi,
I am trying to send a object to a webservice and I get an serialisation
error
on the object saying "object not expected" add "XmlInclude or
SoapInclude attribute"
I have done this but still get the error.
Below is the class. The problem is with "data" object.
I want to send different classes not known to the service wrapped
in another object.
Antyone know why?
Is there a better method I am missing?
rotsey
[XmlInclude(typeof(NukedEmShot))]
public class BroadcastMessage
{
private BroadcastMessageType messageType;
public BroadcastMessageType MessageType
{
get { return MessageType;}
set { MessageType = value;}
}
[XmlElement(typeof(NukedEmShot))]
private object data;
public object Data
{
get { return data; }
set { data = value; }
}
private string sender;
public string Sender
{
get { return sender; }
set { sender = value; }
}
private ArrayList recipients;
public ArrayList Recipients
{
get { return recipients; }
set { recipients = value; }
}
private ReturnStatus status;
public ReturnStatus Status
{
get { return status; }
set { status = value; }
}
public BroadcastMessage()
{
}
}
I am trying to send a object to a webservice and I get an serialisation
error
on the object saying "object not expected" add "XmlInclude or
SoapInclude attribute"
I have done this but still get the error.
Below is the class. The problem is with "data" object.
I want to send different classes not known to the service wrapped
in another object.
Antyone know why?
Is there a better method I am missing?
rotsey
[XmlInclude(typeof(NukedEmShot))]
public class BroadcastMessage
{
private BroadcastMessageType messageType;
public BroadcastMessageType MessageType
{
get { return MessageType;}
set { MessageType = value;}
}
[XmlElement(typeof(NukedEmShot))]
private object data;
public object Data
{
get { return data; }
set { data = value; }
}
private string sender;
public string Sender
{
get { return sender; }
set { sender = value; }
}
private ArrayList recipients;
public ArrayList Recipients
{
get { return recipients; }
set { recipients = value; }
}
private ReturnStatus status;
public ReturnStatus Status
{
get { return status; }
set { status = value; }
}
public BroadcastMessage()
{
}
}