title: How to Call Webservice with Ksoap in android?
body: <p>I have problem with call service ksoap in android, because api service containt note properties, so i don't call service, Please help me.</p>
  
  <p><strong>This is api service</strong></p>
  
  <pre><code> /api.asmx HTTP/1.1
  Host: xxxx
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://tempuri.org/RegisterEx"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;RegisterEx xmlns="http://tempuri.org/"&gt;
        &lt;objCustReg&gt;
          &lt;CustomerID&gt;int&lt;/CustomerID&gt;
          &lt;Firstname&gt;string&lt;/Firstname&gt;
          &lt;Lastname&gt;string&lt;/Lastname&gt;
          &lt;Email&gt;string&lt;/Email&gt;
          &lt;Passwd&gt;string&lt;/Passwd&gt;
          &lt;Phone&gt;string&lt;/Phone&gt;
          &lt;Address&gt;string&lt;/Address&gt;
          &lt;City&gt;string&lt;/City&gt;
          &lt;State&gt;string&lt;/State&gt;
          &lt;Zipcode&gt;string&lt;/Zipcode&gt;
          &lt;Country&gt;string&lt;/Country&gt;
          &lt;RegisterDate&gt;string&lt;/RegisterDate&gt;
          &lt;RegisteryBy&gt;string&lt;/RegisteryBy&gt;
          &lt;Credit /&gt;
        &lt;/objCustReg&gt;
        &lt;Username&gt;string&lt;/Username&gt;
        &lt;Passwd&gt;string&lt;/Passwd&gt;
      &lt;/RegisterEx&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p><strong>This is Code i call api service in android.</strong></p>
  
  <pre><code>              String nameSpace = "http://tempuri.org/";
                  String methodName = "RegisterEx";
                  // EndPoint
                  String endPoint = "http://xxxxx.info/xxxx.asmx";
                  // SOAP Action
                  String soapAction = "http://tempuri.org/RegisterEx";
                  SoapObject rpc = new SoapObject(nameSpace, methodName);
                  SoapObject rpc2 = new SoapObject(nameSpace, methodName);
                  rpc2.addProperty("CustomerID", "1");
                  rpc2.addProperty("Firstname", "boy");
                  rpc2.addProperty("Lastname", "boy");
                  rpc2.addProperty("Email", "email@gmail.com");
                  rpc2.addProperty("Passwd", "123456");
                  rpc2.addProperty("Phone", "123465789");
                  rpc2.addProperty("Address", "address");
                  rpc2.addProperty("City", "city");
                  rpc2.addProperty("State", "2222");
                  rpc2.addProperty("Zipcode", "2222");
                  rpc2.addProperty("RegisterDate", "");
                  rpc2.addProperty("RegisteryBy", "");
                  rpc2.addProperty("Country", "USA");
                  rpc.addProperty("objCustReg", rpc2);
                  rpc.addProperty("sWSUsername", "user");
                  rpc.addProperty("sWSPasswd", "pass");
  
                  SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                          SoapEnvelope.VER10);
  
                  envelope.bodyOut = rpc;
                  envelope.dotNet = true;
                  envelope.setOutputSoapObject(rpc);
  
                  HttpTransportSE transport = new HttpTransportSE(endPoint);
                  try {
                      transport.call(soapAction, envelope);
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
                  SoapObject object = (SoapObject) envelope.bodyIn;
                  result = object.getProperty(0).toString();
  </code></pre>
  
  <p>My code call service return null, Please help me. thanks you!</p>