I\'ve got a WCF Web Service method whose prototype is:
[OperationContract]
Response> GetCustomers();
When I add
Please try this:
[OperationContract]
[return: MessageParameter(Name="YOURNAME")]
Response<List<Customer>> GetCustomers();
You can define your own name in the DataContract
attribute like this:
[DataContract(Name = "ResponseOf{0}")]
public class Response<T>
Note that in your example the {0}
will be replaced and your proxy reference type will be ResponseOfArrayOfCustomer
.
More info here: WCF: Serialization and Generics
Yes. The OperationContractAttribute takes a parameter called Name. You could specify it like this:
[OperationContract(Name = "NameGoesHere")]
Response<List<Customer>> GetCustomers();