dotnet web services:
Hi,
I'm desperate with a webservice and a consuming WinForms-client. It used
to work well, but all of a sudden (= I don't know what I changed really
:) I get an exception "Generating the XML document failed" ("Beim
Generieren des XML-Dokuments ist ein Fehler aufgetreten").
My code method looks like this:
=== Web service method ===
[WebMethod]
[XmlInclude(typeof(myClass))]
public myInheritedClass[] DoOperation(myClass[] Objects, string LicenseKey)
{
....
}
=== Business class myClass ===
[Serializable()]
[System.Xml.Serialization.XmlInclude(typeof(myInheritedClass))]
public class myClass
{
private int _PK;
private string _Value1;
private string _Value2;
private string _Value3;
private string _Value4;
private myDetailClass _Details;
// public get/set accessors for each member
}
=== Business class myInheritedClass ===
[Serializable()]
public class myInheritedClass: myClass
{
private QueryResult _result;
public mdbApplicationFileCommand()
{
}
public enum QueryResult { OK, OutOfDate, NotUsed, New }
}
=== Business class myDetailClass ===
[Serializable()]
public class myDetailClass
{
private int _DetPK;
private int _DetValue1;
private int _DetValue2;
private int _DetValue3;
private int _DetValue4;
private int _DetValue5;
private string _DetMyString;
public mdbApplicationFileDB()
{
}
// get/set accessors for all members
}
The client proxy gets generated without glitch, but at runtime, when the
client calls the web service method DoOperation, I get the exception
described above (Inner Exception is an InvalidCastException).
I'm lost here... can somebody help me? (I'll shout a beer on the
Oktoberfest :-)
Thanks for any hints,