How to pass a complex type object to a web service?
Hi!
I'm testing data transfer to a web service (using VS.NET 2k3 and c#) and I've observed the following:
- passing and returning any simple type object works fine.
- passing and returning any array of simple type objects works fine too.
BUT
- passing and returning any array of objects of this class:
public class Type1
{
protected int x;
protected int y;
public int X
{
get
{
return x;
}
}
public int Y
{
get
{
return y;
}
}
public Type1(int x,int y)
{
this.x = x;
this.y = y;
}
}
throws an exception.
My question is how to pass this correctly. Maybe using XML, but how?? I'm a bit newbie on this.
Thanks to anyone.