I have a POST with a WebMessageFormat.Xml. It's a simple method that takes in a Company object. Aside from simple types containing "CompanyId", "CompanyName", "CompanyDescription etc., inside the XML there is a series of the same element containing tons of metadata involving contacts. I wanted to pop that into a List.
[DataContract(Namespace = "http://www.testcompany.com/2010/01")]
public class Company
{
...
...
[DataMember] public List<CompanyContact> CompanyContacts;
}
The request goes through fine but the list is empty. The other fields are populated from the request without issue. Any ideas of what step I'm missing?
Here's a snapshot of my svc file:
<%@ ServiceHost Language="C#"
Debug="true"
Service="CompanyService"
Factory="Microsoft.ServiceModel.Web.WebServiceHost2Factory"%>
Using the "/help", I doubled checked the schema I'm passing in with the examples provided by the help page.
Any suggestions would be appreciated!