title: How can I display Sap Soap webservices Response in Android ? using ksoap2
body: <pre><code>package com.appu.pack;
  
  import org.ksoap2.SoapEnvelope;
  import org.ksoap2.serialization.SoapObject;
  import org.ksoap2.serialization.SoapSerializationEnvelope;
  import org.ksoap2.transport.HttpTransportSE;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  public class SampleFinalSapActivity extends Activity {
      /** Called when the activity is first created. */
      private final String NAMESPACE ="urn:sap-com:document:sap:soap:functions:mc-style";//this is my server namespace..
      private final String METHOD_NAME ="ZMATERIALS_GROUP_LIST";
      private final String SOAP_ACTION = NAMESPACE + "/" + METHOD_NAME;
      private final String URL ="http://************:8000/sap/bc/srt/wsdl/srvc_14DAE9C8D79F1EE197AD09B4D05C4345/wsdl11/allinone/ws_policy/document?sap-client=800&amp;sap-user=*****&amp;sap-password=******";
              @Override
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
  
          Request.addProperty("Language", "d");
  </code></pre>
  
  <p>//this is the one of the property in wsdl file </p>
  
  <pre><code>        System.out.println("the  Request is :::::"+Request);
  
         SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
         envelope.setOutputSoapObject(Request);
  
          HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
  
          System.out.println("TRANSPORT:"+androidHttpTransport);
  
   try
          {   
  
           androidHttpTransport.call(SOAP_ACTION, envelope);
          androidHttpTransport.debug = true;  //this is optional, use it if you don't want to use a packet sniffer to check what the sent message was (httpTransport.requestDump)
  
          //Object result = envelope.getResponse(); //getting response here
  
          //SoapPrimitive result1 = (SoapPrimitive)envelope.bodyIn;
  
         // System.out.println("Result : " + result1.toString());
  
       SoapObject response = (SoapObject)envelope.getResponse();
  
       System.out.println("RESPONSE:"+response);
          }
         catch(Exception e)
          {
              e.printStackTrace();
          }
      }
  }
  
  When I run this application  I got the exception:02-04 09:31:37.213: WARN/System.err(538): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG &lt;{http://schemas.xmlsoap.org/wsdl/}wsdl:definitions targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style'&gt;@1:686 in java.io.InputStreamReader@4052d188)
  </code></pre>
  
  <p>How can i resolve it ? here i am using Ksoap2.jar for calling webservices  is there any alternative to call sap soap webservices with android ?
  thanks in Advance...</p>