I am new in android development, i need to get the XML file from the Webservice by using SOAP message. I have tried my level best to find out SOAP message parsing in Android but, i cannot find out exact solution for the SOAP message parsing. Here i have attached my sample code to parse the SOAP message. Can you please help me to parse the SOAP message in Android? (Response comes in permission denied).
I tried source code given below:
SoapObject request = new SoapObject(NAMESPACE ,METHOD_NAME);
request.addProperty("username","d");
request.addProperty("password","d123");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);envelope.setAddAdornments(true);
HttpTransportSE httpTransport = new HttpTransportSE(URL);
try
{
httpTransport.call(SOAP_ACTION, envelope); //send request
SoapObject result=(SoapObject)envelope.bodyIn;
String results = result.toString();
tv.setText( ""+results);
}
catch (Exception e)
{
tv.setText(e.getMessage());
}
AndroidManifest.Xml file:
<uses-permission android:name="android.permission.INTERNET">
</uses-permission>