¿Llamar localmente al servicio web RESTful generado por NetBeans IDE desde Android?

para que el IDE de NetBeans pueda generar un servicio web RESTful a partir de la base de datos (la tabla se ha empaquetado en una clase de entidad). Seguí estotutorial y el servicio web RESTful se ha generado con éxito.

Ahora, me gustaría llamar desde mi aplicación de Android, pero hasta ahora no he tenido suerte. Usé "Cliente Http Asíncrono Android Una Biblioteca de Cliente Http Basado en Devolución de Llamada para Android"

Así que aquí está mi fragmento de código:

customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        // "Done"
                        String id = generateId();
                        EditText number = (EditText) findViewById(R.id.caller_phone_number);
                        EditText information = (EditText) findViewById(R.id.caller_information);

                        checkAvailability(id, number.getText().toString(), information.getText().toString());

                        finish();
                    }
                });

y esto:

 public void processWebServices(RequestParams params) {
        AsyncHttpClient client = new AsyncHttpClient();
        client.post("http://localhost:8080/AndroidRESTful/com.erikchenmelbourne.entities.caller/create", params, new AsyncHttpResponseHandler() {
            @Override
            public void onSuccess(int statusCode, Header[] headers, byte[] response) {
                try {
                    JSONObject obj = new JSONObject(response.toString());
                    if (obj.getBoolean("status")) {
                        setDefaultValues();
                        Toast.makeText(getApplicationContext(), "Information has been sent!", Toast.LENGTH_LONG).show();
                    } else {
                        Toast.makeText(getApplicationContext(), obj.getString("error_msg"), Toast.LENGTH_LONG).show();
                    }
                } catch (JSONException e) {
                    Toast.makeText(getApplicationContext(), "Error Occured [Server's JSON response is invalid]!", Toast.LENGTH_LONG).show();
                    e.printStackTrace();
                }
            }

            @Override
            public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {
                if (i == 404) {
                    Toast.makeText(getApplicationContext(), "Requested resource not found", Toast.LENGTH_LONG).show();
                } else if (i == 500) {
                    Toast.makeText(getApplicationContext(), "Something went wrong at server end", Toast.LENGTH_LONG).show();
                } else {
                    Toast.makeText(getApplicationContext(), "Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]", Toast.LENGTH_LONG).show();
                }
            }
        });
    }

y aquí está el método POST generado por NetBeans IDE:

 @Path("/create") 
    @POST
    @Consumes({"application/xml", "application/json"})
    public void create(@QueryParam("id") int id, @QueryParam("number") String number, @QueryParam("information") String information) {
    Caller entity = new Caller (id, number, information);
        super.create(entity);
    }

Agregué la anotación @Path ("/ create") y modifiqué un poco el método.

Por favor, arroja algo de luz, soy bastante nuevo en esto, así que no tengo ni idea. Sé que se debe a algunos errores muy tontos, pero por favor ayuda. El programa se detiene en

"¡Se produjo un error inesperado! [Error más común: el dispositivo podría no estar conectado a Internet o el servidor remoto no está funcionando]"

. Tan obvio que no pude conectar bien los dos programas.

Respuestas a la pregunta(1)

Su respuesta a la pregunta