title: Consume WCF service with complex type
body: <p>I have a service like this:</p>
  
  <pre><code>[ServiceContract]
  public interface IService
  {
      [OperationContract]
      [WebInvoke(Method = "POST", UriTemplate = "DoWork", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
      Person DoWork(Person person);
  }
  </code></pre>
  
  <p>Service implementation is as follows:</p>
  
  <pre><code>public class Service : IService
  {
      public Person DoWork(Person person)
      {
          //To do required function
          return person;
      }
  }
  </code></pre>
  
  <p>My <code>Person</code> type definition is:</p>
  
  <pre><code> [DataContract]
   public class Person
   {
      [DataMember]
      public string Name { get; set; }       
   }
  </code></pre>
  
  <p>I try to consume this service using jQuery:</p>
  
  <pre><code>   var data = { 'person': [{ 'Name': 'xxxxx'}] };
  
     $.ajax({
              type: "POST", 
              url: URL, // Location of the service
              data: JSON.stringify(data), //Data sent to server
              contentType: "application/json", // content type sent to server
              dataType: "json", //Expected data format from server
              processData: false,
              async: false,
              success: function (response) {                 
              },
              failure: function (xhr, status, error) {                   
                  alert(xhr + " " + status + " " + error);
              }
          });
  </code></pre>
  
  <p>I can call the service using this, but the parameter (<code>Person</code> object) for the service method <code>DoWork</code> is always NULL. How can I fix this?</p>