Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String SOAP_ACTION = "http://tempuri.org/LoginUsuario";
- String METHOD_NAME = "LoginUsuario";
- String NAMESPACE = "http://tempuri.org/";
- String URL_LOGIN_WS = "http://192.0.0.1/WebService/Login.asmx";
- SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
- // parametros do método
- request.addProperty("login", login);
- request.addProperty("senha", senha);
- SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- envelope.setOutputSoapObject(request);
- // informa que a integração é com um serviço .net
- envelope.dotNet = true;
- HttpTransportSE httpTransport = new HttpTransportSE(URL_LOGIN_WS);
- try {
- httpTransport.call(SOAP_ACTION, envelope);
- SoapObject results = (SoapObject) envelope.bodyIn;
- int count = results.getPropertyCount();
- Log.i("## WS CALL", "QTD RESULTADO: " + count);
- } catch (Exception e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment