[Mono-devel-list] web services, custom types, and XmlInclude

Lluis Sanchez lluis at ximian.com
Tue Feb 17 06:28:33 EST 2004


Hi!

This is not currently supported. If you file a bug report in Bugzilla
with this sample I'll try to fix it.

Thanks,
Lluis.

On dt, 2004-02-17 at 00:22, Kris Bradley wrote:
> 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
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list