title: How to recive post JSON request inside the Jersey Rest Framework?
body: <p>I am constructing a JSON request in Javascript and trying to send this data to my Rest Webservice </p>
  
  <pre><code>var information = {
      "name": name,
      "mobile": mobile,
      "email": email
  }
  
    $.ajax({
              type: 'POST',
           url: 'http://xxx:8080/PostEx/test/testservice',
              jsonpCallback: 'jsonCallback',
              cache: true,
              data: information,
              dataType: 'jsonp',
              jsonp: false,
              success: function (response) {
  
                 alert(response);
              },
              error: function (e) {
                  $("#divResult").html("WebSerivce unreachable");
              }
          }); 
  </code></pre>
  
  <p>This is my Rest WebService </p>
  
  <pre><code>package com.services;
  import javax.ws.rs.Consumes;
  import javax.ws.rs.POST;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.QueryParam;
  @Path("/testservice")
  public class TestService {
      @POST
      @Consumes("application/json")
      @Produces("application/json")
      public String getData(@QueryParam("toppingid") String toppingid) {
          System.out.println("The toppingid is" + toppingid);
          String toppingobj = "SomeData";
      String  response = "jsonCallback(["+toppingobj.toString()+"])";
          return response;
      }
  }
  </code></pre>
  
  <p>In the browser console under the Network tab , its saying </p>
  
  <p><strong>405 Method Not Allowed</strong></p>