Foros del Web » Programando para Internet » Android »

[SOLUCIONADO] consumir servicio rest

Estas en el tema de consumir servicio rest en el foro de Android en Foros del Web. Hola, necesito poder consumir un servicio web desde android, tengo uno de prueba hecho en un simple archivo java y funciona pero desde android no ...
  #1 (permalink)  
Antiguo 21/11/2018, 13:50
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
consumir servicio rest

Hola,

necesito poder consumir un servicio web desde android, tengo uno de prueba hecho en un simple archivo java y funciona pero desde android no funciona le puse permisos de internet etc.. ahora explico.

Este es el archivo java que funciona, si lo ejecuto va a buscar
Código Java:
Ver original
  1. package validadouble;
  2.  
  3. import java.io.BufferedInputStream;
  4. import java.io.BufferedReader;
  5. import java.io.IOException;
  6. import java.io.InputStream;
  7. import java.io.InputStreamReader;
  8. import java.io.Reader;
  9. import java.net.HttpURLConnection;
  10. import java.net.MalformedURLException;
  11. import java.net.URL;
  12.  
  13. public class Main {
  14.  
  15.     public static void main(String[] args) throws MalformedURLException, IOException {
  16.  
  17.        
  18.         URL url = new URL("http://10.201.1.114:8000/api/profile");
  19.         HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
  20.        
  21.         String basicAuth = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImZkYjIzYWUyZDNkN2JkMTlmZjBmMTA1NmM5Mzg5NWE3MzQ4N2EzNzdkNDNmYjdhNWQ4Yjg2YTYzYTcwNjY4YWM5MWM2OGNjMzhhNjlhOTY0In0.eyJhdWQiOiIzIiwianRpIjoiZmRiMjNhZTJkM2Q3YmQxOWZmMGYxMDU2YzkzODk1YTczNDg3YTM3N2Q0M2ZiN2E1ZDhiODZhNjNhNzA2NjhhYzkxYzY4Y2MzOGE2OWE5NjQiLCJpYXQiOjE1NDIwMzY2MTEsIm5iZiI6MTU0MjAzNjYxMSwiZXhwIjoxNTczNTcyNjExLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.iQoKJu6bzzqbfXI8YvCsObFaA7MsufHtaRCK3JS3arVq2HWvDP268QxG_NzCACVxnuuvYkHXbtClRzkqYfvcWP_SUhd2jTWUjek5OPueUg7XEu-fXyEbu3LXfK4jL2u2w1w_s8a4MfEJIbEJuxBefMa9u8LkK3HuSBPoLzsxYnhONtXFm_qrAsUKnUQgmYq0cKm-4prO5PzNF1FACgIhfmwdOeuNi66ICajjI9eUxF17nT4Rbn-s4_xt4B81sQ_Mxsxejafz2NS4a1zuNDUzkvpWKb34EhKW5r9Pk4SApYlzfkgarQKqUNKw_UnkZPAOf_oVmboGKi1dtsxX3-Oic16hAckR9s_h5P9A6E1xRa8BoIKd8FZhQtSy4vCcsSbyk3jxua_NR-AnydHRgbM_WujDWLM_eItZrxrembXySKsb4dSCMm6pOqvM6i6JNyIUh5LWrP0M1UrvzfeqWSgF4DFV8GhHbuQ6HOGKlC1lLEEYcPgAiWFRW9d-603Lhc8xp96GA7UrdvbqMtb6dUFHbv5Uhy_Ac0O_-3lzu9X-8Kcqo8sICsTuaiwCQ0274dVTkjzLNYTa5TSsLkp-VnWCjelDq-uE9Y10_JbUhuihZZ-oKnQJZ5bIxJPSZ5sj1BzPCMO031SwAGI7A1eXduD-nLZqSAhkiZQS6FWH6WWCtYE";
  22.  
  23.         urlConnection.setRequestProperty ("Authorization", basicAuth);
  24.         urlConnection.setRequestMethod("POST");
  25.         urlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
  26.         urlConnection.setUseCaches(false);
  27.         urlConnection.setDoInput(true);
  28.         urlConnection.setDoOutput(true);
  29.        
  30.        
  31.         try {
  32.         InputStream in = new BufferedInputStream(urlConnection.getInputStream());
  33.  
  34.                 BufferedReader reader = new BufferedReader(new InputStreamReader(in));
  35.                 String line="";                
  36.                 while((line = reader.readLine()) != null){
  37.                     System.out.println(line);
  38.                 }
  39.        
  40.         } finally {
  41.         urlConnection.disconnect();
  42.         }
  43.        
  44.     }
  45.  
  46.    
  47. }


Lo que no funciona es lo que tengo en android, pondre el archivo MainActivity.java, ClassConnection.java y el AndroidManifest.xml



MainActivity.java
Código Java:
Ver original
  1. package com.example.practice.getpost;
  2.  
  3. import android.support.v7.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.widget.TextView;
  6.  
  7. import org.json.JSONArray;
  8. import org.json.JSONException;
  9. import org.json.JSONObject;
  10.  
  11. import java.util.ArrayList;
  12. import java.util.List;
  13. import java.util.concurrent.ExecutionException;
  14.  
  15. public class MainActivity extends AppCompatActivity {
  16.  
  17.     TextView txtnombre;
  18.  
  19.     @Override
  20.     protected void onCreate(Bundle savedInstanceState) {
  21.         super.onCreate(savedInstanceState);
  22.         setContentView(R.layout.activity_main);
  23.  
  24.         txtnombre  = (TextView) findViewById(R.id.txtnombre);
  25.  
  26.         ClassConnection connection = new ClassConnection();
  27.         try {
  28.             String response = connection.execute("http://10.201.1.114:8000/api/profile").get();
  29.  
  30.             JSONArray jsonArray = new JSONArray(response);
  31.             //JSONObject jsonObject = jsonArray.getJSONObject(2);
  32.  
  33.             //String name = jsonObject.getString("name");
  34.             //String name = jsonArray.getJSONObject(2).toString();
  35.  
  36.             //String nombres = "";
  37.  
  38.             //ArrayList<String> listado = new ArrayList<>();
  39.             //for (int i= 0; i < jsonArray.length(); i++){
  40.  
  41.                 //JSONObject json = jsonArray.getJSONObject(i);
  42.                 //listado.add(json.getString("name"));
  43.                 //nombres += json;
  44.             //}
  45.  
  46.             txtnombre.setText(jsonArray.toString());
  47.  
  48.         } catch (ExecutionException e) {
  49.             e.printStackTrace();
  50.         } catch (InterruptedException e) {
  51.             e.printStackTrace();
  52.         } catch (JSONException e) {
  53.             e.printStackTrace();
  54.         }
  55.  
  56.  
  57.     }
  58. }

ClassConnection.java
Código Java:
Ver original
  1. package com.example.practice.getpost;
  2.  
  3. import android.os.AsyncTask;
  4.  
  5. import java.io.BufferedInputStream;
  6. import java.io.BufferedReader;
  7. import java.io.IOException;
  8. import java.io.InputStream;
  9. import java.io.InputStreamReader;
  10. import java.net.HttpURLConnection;
  11. import java.net.MalformedURLException;
  12. import java.net.URL;
  13.  
  14. public class ClassConnection extends AsyncTask<String, String, String> {
  15.     @Override
  16.     protected String doInBackground(String... strings) {
  17.         HttpURLConnection httpURLConnection=null;
  18.         URL url = null;
  19.         try {
  20.             url = new URL(strings[0]);
  21.         } catch (MalformedURLException e) {
  22.             e.printStackTrace();
  23.         }
  24.  
  25.         try {
  26.             httpURLConnection = (HttpURLConnection) url.openConnection();
  27.             httpURLConnection.connect();
  28.  
  29.             String basicAuth = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImZkYjIzYWUyZDNkN2JkMTlmZjBmMTA1NmM5Mzg5NWE3MzQ4N2EzNzdkNDNmYjdhNWQ4Yjg2YTYzYTcwNjY4YWM5MWM2OGNjMzhhNjlhOTY0In0.eyJhdWQiOiIzIiwianRpIjoiZmRiMjNhZTJkM2Q3YmQxOWZmMGYxMDU2YzkzODk1YTczNDg3YTM3N2Q0M2ZiN2E1ZDhiODZhNjNhNzA2NjhhYzkxYzY4Y2MzOGE2OWE5NjQiLCJpYXQiOjE1NDIwMzY2MTEsIm5iZiI6MTU0MjAzNjYxMSwiZXhwIjoxNTczNTcyNjExLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.iQoKJu6bzzqbfXI8YvCsObFaA7MsufHtaRCK3JS3arVq2HWvDP268QxG_NzCACVxnuuvYkHXbtClRzkqYfvcWP_SUhd2jTWUjek5OPueUg7XEu-fXyEbu3LXfK4jL2u2w1w_s8a4MfEJIbEJuxBefMa9u8LkK3HuSBPoLzsxYnhONtXFm_qrAsUKnUQgmYq0cKm-4prO5PzNF1FACgIhfmwdOeuNi66ICajjI9eUxF17nT4Rbn-s4_xt4B81sQ_Mxsxejafz2NS4a1zuNDUzkvpWKb34EhKW5r9Pk4SApYlzfkgarQKqUNKw_UnkZPAOf_oVmboGKi1dtsxX3-Oic16hAckR9s_h5P9A6E1xRa8BoIKd8FZhQtSy4vCcsSbyk3jxua_NR-AnydHRgbM_WujDWLM_eItZrxrembXySKsb4dSCMm6pOqvM6i6JNyIUh5LWrP0M1UrvzfeqWSgF4DFV8GhHbuQ6HOGKlC1lLEEYcPgAiWFRW9d-603Lhc8xp96GA7UrdvbqMtb6dUFHbv5Uhy_Ac0O_-3lzu9X-8Kcqo8sICsTuaiwCQ0274dVTkjzLNYTa5TSsLkp-VnWCjelDq-uE9Y10_JbUhuihZZ-oKnQJZ5bIxJPSZ5sj1BzPCMO031SwAGI7A1eXduD-nLZqSAhkiZQS6FWH6WWCtYE";
  30.  
  31.             httpURLConnection.setRequestProperty ("Authorization", basicAuth);
  32.             httpURLConnection.setRequestMethod("POST");
  33.             httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
  34.             httpURLConnection.setUseCaches(false);
  35.             httpURLConnection.setDoInput(true);
  36.             httpURLConnection.setDoOutput(true);
  37.  
  38.             //int code = httpURLConnection.getResponseCode();
  39.             //if(code == HttpURLConnection.HTTP_OK){
  40.                 InputStream in = new BufferedInputStream(httpURLConnection.getInputStream());
  41.  
  42.                 BufferedReader reader = new BufferedReader(new InputStreamReader(in));
  43.                 String line="";
  44.                 StringBuffer buffer = new StringBuffer();
  45.                 while((line = reader.readLine()) != null){
  46.                     buffer.append(line);
  47.                 }
  48.  
  49.                 return buffer.toString();
  50.  
  51.             //}
  52.         } catch (IOException e) {
  53.             e.printStackTrace();
  54.         }
  55.         return null;
  56.     }
  57. }

AndroidManifest.xml
Código XML:
Ver original
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:tools="http://schemas.android.com/tools"
  4.    package="com.example.practice.getpost">
  5.  
  6.     <application
  7.        android:allowBackup="true"
  8.        android:icon="@mipmap/ic_launcher"
  9.        android:label="@string/app_name"
  10.        android:roundIcon="@mipmap/ic_launcher_round"
  11.        android:supportsRtl="true"
  12.        android:theme="@style/AppTheme">
  13.         <activity android:name=".MainActivity">
  14.             <intent-filter>
  15.                 <action android:name="android.intent.action.MAIN" />
  16.  
  17.                 <category android:name="android.intent.category.LAUNCHER" />
  18.             </intent-filter>
  19.         </activity>
  20.     </application>
  21.  
  22.     <uses-permission android:name="android.permission.ACCOUNT_MANAGER"
  23.        tools:ignore="ProtectedPermissions" />
  24.     <uses-permission android:name="android.permission.INTERNET" />
  25.     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  26. </manifest>

ojala me puedan ayudar,

bye

Última edición por __SDP__; 21/11/2018 a las 13:55
  #2 (permalink)  
Antiguo 22/11/2018, 09:17
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
Respuesta: consumir servicio rest

encontre como acceder utilizando un token, de la misma forma envias parametros por post dejo el codigo por si a alguien el sirve, esta clase se llama ClassConnectionV2 porque es otro archivo nomas que utilice para probar

Código Java:
Ver original
  1. package com.example.practice.getpost;
  2.  
  3. import android.os.AsyncTask;
  4.  
  5. import java.io.BufferedInputStream;
  6. import java.io.BufferedReader;
  7. import java.io.IOException;
  8. import java.io.InputStream;
  9. import java.io.InputStreamReader;
  10. import java.net.HttpURLConnection;
  11. import java.net.MalformedURLException;
  12. import java.net.URL;
  13.  
  14. public class ClassConnectionV2 extends AsyncTask<String, String, String> {
  15.  
  16.  
  17.     @Override
  18.     protected String doInBackground(String... strings) {
  19.  
  20.         HttpURLConnection httpURLConnection = null;
  21.         URL url = null;
  22.         try {
  23.             url = new URL(strings[0]);
  24.         } catch (MalformedURLException e) {
  25.             e.printStackTrace();
  26.         }
  27.  
  28.         try {
  29.             httpURLConnection = (HttpURLConnection) url.openConnection();
  30.  
  31.             String basicAuth = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImZkYjIzYWUyZDNkN2JkMTlmZjBmMTA1NmM5Mzg5NWE3MzQ4N2EzNzdkNDNmYjdhNWQ4Yjg2YTYzYTcwNjY4YWM5MWM2OGNjMzhhNjlhOTY0In0.eyJhdWQiOiIzIiwianRpIjoiZmRiMjNhZTJkM2Q3YmQxOWZmMGYxMDU2YzkzODk1YTczNDg3YTM3N2Q0M2ZiN2E1ZDhiODZhNjNhNzA2NjhhYzkxYzY4Y2MzOGE2OWE5NjQiLCJpYXQiOjE1NDIwMzY2MTEsIm5iZiI6MTU0MjAzNjYxMSwiZXhwIjoxNTczNTcyNjExLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.iQoKJu6bzzqbfXI8YvCsObFaA7MsufHtaRCK3JS3arVq2HWvDP268QxG_NzCACVxnuuvYkHXbtClRzkqYfvcWP_SUhd2jTWUjek5OPueUg7XEu-fXyEbu3LXfK4jL2u2w1w_s8a4MfEJIbEJuxBefMa9u8LkK3HuSBPoLzsxYnhONtXFm_qrAsUKnUQgmYq0cKm-4prO5PzNF1FACgIhfmwdOeuNi66ICajjI9eUxF17nT4Rbn-s4_xt4B81sQ_Mxsxejafz2NS4a1zuNDUzkvpWKb34EhKW5r9Pk4SApYlzfkgarQKqUNKw_UnkZPAOf_oVmboGKi1dtsxX3-Oic16hAckR9s_h5P9A6E1xRa8BoIKd8FZhQtSy4vCcsSbyk3jxua_NR-AnydHRgbM_WujDWLM_eItZrxrembXySKsb4dSCMm6pOqvM6i6JNyIUh5LWrP0M1UrvzfeqWSgF4DFV8GhHbuQ6HOGKlC1lLEEYcPgAiWFRW9d-603Lhc8xp96GA7UrdvbqMtb6dUFHbv5Uhy_Ac0O_-3lzu9X-8Kcqo8sICsTuaiwCQ0274dVTkjzLNYTa5TSsLkp-VnWCjelDq-uE9Y10_JbUhuihZZ-oKnQJZ5bIxJPSZ5sj1BzPCMO031SwAGI7A1eXduD-nLZqSAhkiZQS6FWH6WWCtYE";
  32.             httpURLConnection.setRequestProperty ("Authorization", basicAuth);
  33.             httpURLConnection.setRequestMethod("POST");
  34.  
  35.             httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
  36.             httpURLConnection.setUseCaches(false);
  37.             httpURLConnection.setDoInput(true);
  38.             httpURLConnection.setDoOutput(true);
  39.  
  40.             int code = httpURLConnection.getResponseCode();
  41.             String linea = "";
  42.             String line;
  43.  
  44.             if(code == HttpURLConnection.HTTP_OK){
  45.  
  46.                 InputStream in = new BufferedInputStream(httpURLConnection.getInputStream());
  47.  
  48.                 BufferedReader reader = new BufferedReader(new InputStreamReader(in));
  49.                 while((line = reader.readLine()) != null){
  50.                     linea += line;
  51.                 }
  52.  
  53.                 return linea;
  54.  
  55.             }
  56.  
  57.             return "nok";
  58.  
  59.         } catch (IOException e) {
  60.             e.printStackTrace();
  61.         }
  62.  
  63.         return null;
  64.     }
  65. }
  #3 (permalink)  
Antiguo 22/11/2018, 13:33
 
Fecha de Ingreso: julio-2008
Mensajes: 253
Antigüedad: 15 años, 9 meses
Puntos: 11
Respuesta: consumir servicio rest

Gracias por el aporte, sin duda toda ayuda es bien recibida
__________________
Neothek.com | Web hosting, registro de dominios, Diseño Web y Certificados SSL
  #4 (permalink)  
Antiguo 23/11/2018, 06:06
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
Respuesta: consumir servicio rest

debo hace una corrección el ClassConnectionV2 anterior es para cuando ya tienen el token y eso se pone en el header de la petición, pero para pasar parámetros ejemplo los datos del login se hace lo que esta en el siguiente ClassConnectionV3

Código Java:
Ver original
  1. package com.example.practice.getpost;
  2.  
  3. import android.os.AsyncTask;
  4.  
  5. import java.io.BufferedInputStream;
  6. import java.io.BufferedReader;
  7. import java.io.IOException;
  8. import java.io.InputStream;
  9. import java.io.InputStreamReader;
  10. import java.net.HttpURLConnection;
  11. import java.net.MalformedURLException;
  12. import java.net.URL;
  13. import java.net.URLEncoder;
  14. import java.util.LinkedHashMap;
  15. import java.util.Map;
  16.  
  17. public class ClassConnectionV3 extends AsyncTask<String, String, String> {
  18.  
  19.     @Override
  20.     protected String doInBackground(String... strings) {
  21.  
  22.         HttpURLConnection httpURLConnection = null;
  23.         URL url = null;
  24.         try {
  25.             url = new URL(strings[0]);
  26.         } catch (MalformedURLException e) {
  27.             e.printStackTrace();
  28.         }
  29.  
  30.         try {
  31.             httpURLConnection = (HttpURLConnection) url.openConnection();
  32.  
  33.             //String basicAuth = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImZkYjIzYWUyZDNkN2JkMTlmZjBmMTA1NmM5Mzg5NWE3MzQ4N2EzNzdkNDNmYjdhNWQ4Yjg2YTYzYTcwNjY4YWM5MWM2OGNjMzhhNjlhOTY0In0.eyJhdWQiOiIzIiwianRpIjoiZmRiMjNhZTJkM2Q3YmQxOWZmMGYxMDU2YzkzODk1YTczNDg3YTM3N2Q0M2ZiN2E1ZDhiODZhNjNhNzA2NjhhYzkxYzY4Y2MzOGE2OWE5NjQiLCJpYXQiOjE1NDIwMzY2MTEsIm5iZiI6MTU0MjAzNjYxMSwiZXhwIjoxNTczNTcyNjExLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.iQoKJu6bzzqbfXI8YvCsObFaA7MsufHtaRCK3JS3arVq2HWvDP268QxG_NzCACVxnuuvYkHXbtClRzkqYfvcWP_SUhd2jTWUjek5OPueUg7XEu-fXyEbu3LXfK4jL2u2w1w_s8a4MfEJIbEJuxBefMa9u8LkK3HuSBPoLzsxYnhONtXFm_qrAsUKnUQgmYq0cKm-4prO5PzNF1FACgIhfmwdOeuNi66ICajjI9eUxF17nT4Rbn-s4_xt4B81sQ_Mxsxejafz2NS4a1zuNDUzkvpWKb34EhKW5r9Pk4SApYlzfkgarQKqUNKw_UnkZPAOf_oVmboGKi1dtsxX3-Oic16hAckR9s_h5P9A6E1xRa8BoIKd8FZhQtSy4vCcsSbyk3jxua_NR-AnydHRgbM_WujDWLM_eItZrxrembXySKsb4dSCMm6pOqvM6i6JNyIUh5LWrP0M1UrvzfeqWSgF4DFV8GhHbuQ6HOGKlC1lLEEYcPgAiWFRW9d-603Lhc8xp96GA7UrdvbqMtb6dUFHbv5Uhy_Ac0O_-3lzu9X-8Kcqo8sICsTuaiwCQ0274dVTkjzLNYTa5TSsLkp-VnWCjelDq-uE9Y10_JbUhuihZZ-oKnQJZ5bIxJPSZ5sj1BzPCMO031SwAGI7A1eXduD-nLZqSAhkiZQS6FWH6WWCtYE";
  34.             //httpURLConnection.setRequestProperty ("Authorization", basicAuth);
  35.  
  36.             Map<String,Object> params = new LinkedHashMap<>();
  37.             params.put("email", "[email protected]");
  38.             params.put("password", "123");
  39.  
  40.             StringBuilder postData = new StringBuilder();
  41.             for (Map.Entry<String,Object> param : params.entrySet()) {
  42.                 if (postData.length() != 0) postData.append('&');
  43.                 postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
  44.                 postData.append('=');
  45.                 postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));
  46.             }
  47.             byte[] postDataBytes = postData.toString().getBytes("UTF-8");
  48.  
  49.             httpURLConnection.setRequestMethod("POST");
  50.  
  51.             httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
  52.             httpURLConnection.setUseCaches(false);
  53.             httpURLConnection.setDoInput(true);
  54.             httpURLConnection.setDoOutput(true);
  55.             httpURLConnection.getOutputStream().write(postDataBytes);
  56.  
  57.             int code = httpURLConnection.getResponseCode();
  58.             String linea = "";
  59.             String line;
  60.  
  61.             if(code == HttpURLConnection.HTTP_OK){
  62.  
  63.                 InputStream in = new BufferedInputStream(httpURLConnection.getInputStream());
  64.  
  65.                 BufferedReader reader = new BufferedReader(new InputStreamReader(in));
  66.                 while((line = reader.readLine()) != null){
  67.                     linea += line;
  68.                 }
  69.  
  70.                 return linea;
  71.  
  72.             }
  73.  
  74.             return "nok";
  75.  
  76.         } catch (IOException e) {
  77.             e.printStackTrace();
  78.         }
  79.  
  80.         return null;
  81.     }
  82. }

lo unico que hay que hacer es cambiar donde dice ClassConnection por ClassConnectionV3 en el mainactivity.java que puse anteriormente

y listo

Última edición por __SDP__; 23/11/2018 a las 12:33

Etiquetas: consumir, rest, servicio
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:58.