I need to print XML for request, not response.
Object response = null;
String METHOD_NAME = "GenerateOtp";// GenerateOTP
String NAMESPACE = "http://com/abc/ppi";
String URL = "http://name.com/methodname/";
// String SOAP_ACTION = NAMESPACE+"/"+METHOD_NAME ;
String SOAP_ACTION = "";
try {
// String xml = xmlns="java:com.abc.ppi.request" ;
SoapObject RequestParent = new SoapObject("", METHOD_NAME);
SoapObject Request1 = new SoapObject("", "request");
PropertyInfo pi = new PropertyInfo();
pi.setNamespace("http://com/abc/ppi");
pi.setName("DeviceId");
pi.setValue(DeviceId);
Request1.addProperty(pi);
pi = new PropertyInfo();
pi.setNamespace("http://com/abc/ppi");
pi.setName("DeviceType");
pi.setValue(DeviceType);
Request1.addProperty(pi);
SoapObject HeaderRequest = new SoapObject("","HeaderTag");
pi = new PropertyInfo();
pi.setNamespace("java:com.abc.ppi.request");
pi.setName("MobileNo");
pi.setValue(MobileNo);
HeaderRequest.addProperty(pi);
Request1.addSoapObject(HeaderRequest);
RequestParent.addSoapObject(Request1);
Log.v("upi", "RequestParent:" + RequestParent);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = false;
soapEnvelope.setOutputSoapObject(RequestParent);
HttpTransportSE transport = new HttpTransportSE(URL);
transport.call(SOAP_ACTION, soapEnvelope);
response = (Object) soapEnvelope.getResponse();
Used Jar : ksoap2-android-assembly-3.2.0-jar-with-dependencies.jar Android note: I want to print this xml soap request into XML FORMAT like this.. I need to view this xml request before going to make request to soap webservices.I can able to see this request format from webservices java server side. But, I want to see this request from Android Client Side. ? ? ?