title: Jquery (ajax request) to WCF. WCF getting not initialized data parameters
body: <p>Hi I have next WCF  service. </p>
  
  <pre><code>[OperationContract]     
  [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
  //[WebInvoke(UriTemplate = "GetStores?dataViewID={dataViewID}&amp;filter={filter}&amp;extent={extent}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,)]
  string GetStores(int dataViewID, string filter, MapExtent extent);
  
  [DataContract]
  public class MapExtent
  {
      [DataMember]
      public double XMax { get; set; }
  
      [DataMember]
      public double XMin { get; set; }
  
      [DataMember]
      public double YMax { get; set; }
  
      [DataMember]
      public double YMin { get; set; }
  }
  </code></pre>
  
  <p>jQuery part is next</p>
  
  <pre><code>//var mapextend = { XMax: 1.0, XMin: 1.0, YMax: 10.5, YMin: 4.5 };
  var paramData = {"dataViewID":12, "filter":"", extent : {"XMax": 1.0, "XMin": 1.0, "YMax": 10.5, "YMin": 4.5} };
  $.ajax({
      url: serviceurl + 'GetStores',
      type: 'GET',
      contentType: 'application/json',
      data: paramData,
      success: function (result) {
          alert(result);                    
          },
      error: function (xhr) {
          alert(xhr);
          }
      });
  </code></pre>
  
  <p>Config look like it </p>
  
  <pre><code>&lt;system.serviceModel&gt;
  
      &lt;bindings&gt;
        &lt;webHttpBinding&gt;
           &lt;binding name="webBinding"&gt;&lt;/binding&gt;
        &lt;/webHttpBinding&gt;           
      &lt;/bindings&gt;
  
      &lt;behaviors&gt;
  
        &lt;endpointBehaviors&gt;
          &lt;behavior name="jsonBehavior"&gt;
            &lt;enableWebScript/&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
  
        &lt;serviceBehaviors&gt;
          &lt;behavior name="ServiceBehavior"&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
  
      &lt;/behaviors&gt;
  
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"/&gt;
  
      &lt;services&gt;           
        &lt;service behaviorConfiguration="ServiceBehavior" name="MyService"&gt;
          &lt;endpoint address="" binding="webHttpBinding"  bindingConfiguration="webBinding" contract="IMyService" behaviorConfiguration="jsonBehavior" /&gt;        
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>When ajax call this service it calls but all parameters doesn't get any values. What i doing wrong ? </p>