[Mono-devel-list] web services, custom types, and XmlInclude
Kris Bradley
krisolav at hotmail.com
Mon Feb 16 18:22:21 EST 2004
Id like to have a web service method that returns an array of custom types.
I wrote a simple test that works under MS .NET, but not under Mono. For
example:
[WebMethod]
[XmlInclude(typeof(ComplexThing))]
public ArrayList foo()
{
ArrayList list = new ArrayList();
list.Add(new ComplexThing("abc", 1.1f));
list.Add(new ComplexThing("xyz", 2.0f));
return list;
}
The code for ComplexThing is:
public class ComplexThing
{
public ComplexThing() {}
public ComplexThing(string name, float val)
{
this.name = name;
this.val = val;
}
public string name;
public float val;
}
When I run this under Mono, I get the error:
Invalid type: TestService.ComplexThing
Is this not supported? Is there a better way to do this?
Thanks,
- Kris
_________________________________________________________________
Keep up with high-tech trends here at "Hook'd on Technology."
http://special.msn.com/msnbc/hookedontech.armx
More information about the Mono-devel-list
mailing list