title: How to get array from Http Post in a Restful Web Service?
body: <p>I have a controller for AngularJS Framework. I use a Http Post Request to send an array to a server. How to get this array in a java method?</p>
  
  <p>This is my controller</p>
  
  <pre><code>var app = angular.module('myApp', []);
  app.controller('myCtrl', function($scope, $http) {
  
  var indici = new Array();
  
  indici.push(1);
  indici.push(2);
  
  $http.post("http://localhost:8080/SistemiDistribuiti/rest/Point/Trovati", indici, {
                headers: { 'Content-Type': 'application/json' }
              }).success(function(receivedData, status) {
                  $scope.someData = receivedData;
              });
  </code></pre>
  
  <p>And this is my java class but i don't know how to get my array. </p>
  
  <pre><code>import javax.ws.rs.Path;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.POST;
  import javax.ws.rs.Consumes;
  
  @Path("Point")
  public class PointService {
  
  
  @POST
  @Path("Trovati")
  @Consumes(MediaType.APPLICATION_JSON)
  public void RetrieveData() {
       //how print my array?
  }
  </code></pre>