title: Jquery $.ajax, msg is empty when I call a web service (WCF) method
body: <p>I have a Web service WCF and I call the methods of my Wcf with Jquery ajax.</p>
  
  <p>When I tested with a method without parameter, it works well.</p>
  
  <p>But when I call a method with parameter, it doesn't work.</p>
  
  <p>The problem is that in my success in $.ajax, msg is empty.</p>
  
  <p>Here is my javaScript code : </p>
  
  <pre><code>function getStatistic3() {
  
  var response;
  var allstat3 = [];
  var allyearstat3 = [];
  
  var kla = $('#Select1').val();
  kla = kla.replace("'", "\\'");
  if (kla) {
      $.ajax({
          type: 'GET',
          url: 'http://localhost:52768/Service1/Statistic_3',
          data: "klant='" + encodeURIComponent(kla) + "'",
          contentType: 'application/json; charset=utf-8',
          dataType: 'json',
          success: function (msg) {
              response = msg;
              for (var i = 0; i &lt; response.Items.length; i++) {
                  var j = 0;
                  allstat3[i] = [response.Items[i].Interventie, response.Items[i].Sum[j], response.Items[i].Sum[++j], response.Items[i].Sum[++j], response.Items[i].Sum[++j], response.Items[i].Sum[++j]];
              }
              allyearstat3[0] = [response.Items[0].YearStart, response.Items[0].YearStart + 1, response.Items[0].YearStart + 2, response.Items[0].YearStart + 3, response.Items[0].YearStart + 4];
              fillDataTable3(allstat3, allyearstat3);
              if (bool3) {
                  $('thead tr th:eq(0)').replaceWith(function () {
                      return $("&lt;td /&gt;").append($(this).contents());
                  });
                  $('thead th').attr('scope', 'col');
                  bool3 = false;
              }
              $('table').visualize({ type: 'line' });
          },
          error: function (e) {
              alert("error loading statistic 3");
          }
      });
  }
  }
  </code></pre>
  
  <p>I tested all with an .asmx Web service and all works well.</p>
  
  <p>I have this error when I call the method :</p>
  
  <pre><code>TypeError: response.Items[0] is undefined
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/jNieM.png" alt="enter image description here"></p>
  
  <p>Msg is empty :</p>
  
  <p><img src="https://i.stack.imgur.com/dCW9k.png" alt="enter image description here"></p>
  
  <p>I think that I have a problem when I pass the parameter in ma $.ajax.</p>