final String SOAP_ACTION = "http://tempuri.org/Add"; final String OPERATION_NAME = "Auth"; final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/"; final String SOAP_ADDRESS = "http://citywebsofts.com/mysrv.asmx"; //Property which holds input parameters SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName("un"); pi.setValue(R.id.editText); pi.setType(String.class); request.addProperty(pi); pi=new PropertyInfo(); pi.setName("pass"); pi.setValue(R.id.editText2); pi.setType(String.class); request.addProperty(pi); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS,60000000); Object response=null; try { httpTransport.call(SOAP_ACTION, envelope); response = envelope.getResponse(); } catch (Exception exception) { TextView tv= (TextView) findViewById(R.id.textView); response=exception.toString(); tv.setText(response.toString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)