I have a soap web service with method:
string startReaction(object reaction);
Inside that method I convert this object to it's real type:
Reaction reactionObj = (Reaction)reaction;
...
I have the same Reaction class in the form project (windows for that should invoke this ws). Here I make Reaction object instance and fill it with data and try to send to web service.
string data = webserviceReference1.startReaction(reaction);
I have also tried:
string data = webserviceReference1.startReaction(reaction as object);
but nothing. Then I try to add this attribute on Reaction class:
[XmlInclude(typeof(object))]
public class Reaction{...
but nothing. The error that I get is:
There was an error generating the XML document. :: System.InvalidOperationException: The type Demo.Form1+Reaction was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
string startReaction(Reaction reaction);?