title: KSoap calling .NET ASMX service passing null arguments
body: <p>I am trying to call a ASMX service using KSoap from Android application. It accepts two parameters, both string type. When called from .NET application it succeds but when call from Android application webservice gets blank parameter, I dont understand why ..</p>
  
  <p>Here is the code for the same</p>
  
  <pre><code>            static String NAMESPACE = "http://softco.org";
              static String URL_WS = "http://www.dummy.com/newservice.asmx";
  
              String GET_USER_DETAILS = "User_Verification";
              SoapObject request = new SoapObject(NAMESPACE, GET_USER_DETAILS);
              HttpTransportSE androidHttpTransport;
  
              // add parameters and values
              request.addProperty("MobileNo", String.valueOf("01234567899"));
              request.addProperty("Password", String.valueOf("abcdef"));
  
              SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
  
  
              envelope.dotNet = true;
              envelope.encodingStyle = SoapSerializationEnvelope.XSD;
              envelope.setOutputSoapObject(request);
  
              // Web method call
  
              SoapObject result;
  
              try {
                  androidHttpTransport = new HttpTransportSE(URL_WS);
                  androidHttpTransport.setXmlVersionTag("&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;");
                  androidHttpTransport.call(NAMESPACE + "/" + GET_USER_DETAILS, envelope);
                  result = (SoapObject) envelope.getResponse();
  
                  // get the response
  
                  int propCnt = result.getPropertyCount();
  
  
                  request = null;
                  envelope = null;
                  androidHttpTransport = null;
  
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } catch (XmlPullParserException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } finally {
  
              }
  </code></pre>
  
  <p>I used Fiddler to see the difference bwtween Visual Studio and Eclipse calls and found both generates different xml for the call, dont understand how can I make Ksoap to send correct one</p>
  
  <p>Call by Visual Studio -</p>
  
  <pre><code>    &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;User_Verification xmlns="http://softco.org/"&gt;&lt;MobileNo xmlns=""&gt;01234567899&lt;/MobileNo&gt;&lt;Password xmlns=""&gt;abcdef&lt;/Password&gt;&lt;/User_Verification&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;
  </code></pre>
  
  <p>Call from Eclipse Android project</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;v:Header /&gt;
      &lt;v:Body&gt;&lt;User_Verification xmlns="http://softco.org" id="o0" c:root="1"&gt;&lt;MobileNo i:type="d:string"&gt;01234567899&lt;/MobileNo&gt;&lt;Password i:type="d:string"&gt;abcdef&lt;/Password&gt;&lt;/User_Verification&gt;&lt;/v:Body&gt;&lt;/v:Envelope&gt;
  </code></pre>
  
  <p>Any pointers would be a great help.</p>