I'm using Visual Studio 2010, and I've got a service reference to a web service we created. Our methods return objects that contain generic List properties:
public class ExampleResponse
{
private System.Collections.Generic.List<int> intValues;
[WCF::MessageBodyMember(Name = "IntValues")]
public System.Collections.Generic.List<int> IntValues
{
get { return intValues; }
set { intValues= value; }
}
}
On the client-side, it creates a References.cs file with int[] instead of List:
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="SomeNamespace", Order=0)]
[System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
[System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays", IsNullable=false)]
public int[] IntValues;
On the service reference settings the Collection Type is set to use List, not Arrays. Yet, it's still doing so.
Any info on how to solve this would be extremely helpful, it seems to make no sense.