title: How to deal with WSDL complexType on Android app development?
body: <p>I am using Eclipse Indigo to create an Android application to invoke a webservice. This is already working on a Java project but I know this is a whole different thing. </p>
  
  <p>I know you can use ksoap2 library and invoke the webservice like this:</p>
  
  <pre><code>SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
  request.addProperty("something","Somevalue");
  </code></pre>
  
  <p>But I don't know how to invoke the webservice when your WSDL is of complexType, like the following:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;definitions name='Gator' targetNamespace='http://home.com/gatorws/ws/Gator/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://home.com/gatorws/ws/Gator/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'&gt;
   &lt;types&gt;
    &lt;xs:schema targetNamespace='http://home.com/gatorws/ws/Gator/' version='1.0' xmlns:tns='http://home.com/gatorws/ws/Gator/' xmlns:xs='http://www.w3.org/2001/XMLSchema'&gt;
     &lt;xs:element name='Gator'&gt;
      &lt;xs:complexType&gt;
       &lt;xs:sequence&gt;
        &lt;xs:element name='idBus' type='tns:IdBusCT'/&gt;
        &lt;xs:element name='infoGPS' type='tns:InfoGPSCT'/&gt;
        &lt;xs:element name='infoBus' type='tns:InfoBusCT'/&gt;
        &lt;xs:element name='infoMore' type='tns:InfoMoreCT'/&gt;
        &lt;xs:element maxOccurs='unbounded' minOccurs='0' name='msjcs' nillable='true' type='tns:Mesaje'/&gt;
        &lt;xs:element name='msjOPT' type='tns:MsjCor'/&gt;
       &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
     &lt;/xs:element&gt;
     &lt;xs:element name='GatorFault'&gt;
      &lt;xs:complexType&gt;
       &lt;xs:sequence&gt;
        &lt;xs:element name='result' type='xs:int'/&gt;
        &lt;xs:element name='msj' type='xs:string'/&gt;
       &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
     &lt;/xs:element&gt;
     &lt;xs:element name='GatorResponse'&gt;
      &lt;xs:complexType&gt;
       &lt;xs:sequence&gt;
        &lt;xs:element name='result' type='tns:Result'/&gt;
       &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
     &lt;/xs:element&gt;
     &lt;xs:complexType name='IdBusCT'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element name='idOp' type='xs:int'/&gt;
       &lt;xs:element name='codBus' nillable='true' type='xs:string'/&gt;
       &lt;xs:element name='codEqu' nillable='true' type='xs:string'/&gt;
       &lt;xs:element name='codType' type='xs:int'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='InfoGPSCT'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element name='lat' type='xs:double'/&gt;
       &lt;xs:element name='lng' type='xs:double'/&gt;
       &lt;xs:element name='date' type='xs:string'/&gt;
       &lt;xs:element name='direction' type='xs:int'/&gt;
       &lt;xs:element name='valid' type='xs:int'/&gt;
       &lt;xs:element name='velocity' type='xs:double'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='InfoBusCT'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element default='1' name='ignition' nillable='true' type='xs:int'/&gt;
       &lt;xs:element default='0' name='emergency' nillable='true' type='xs:int'/&gt;
       &lt;xs:element default='0' name='idRoute' nillable='true' type='xs:int'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='MsjCor'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element name='last' type='xs:lng'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='InfoMoreCT'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element default='' name='CODDriver' nillable='true' type='xs:string'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='Result'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element name='result' type='xs:int'/&gt;
       &lt;xs:element maxOccurs='unbounded' minOccurs='0' name='msjOPT' nillable='true' type='tns:Mesaje'/&gt;
       &lt;xs:element name='msjcs' nillable='true' type='tns:MsjCor'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:complexType name='Mesaje'&gt;
      &lt;xs:sequence&gt;
       &lt;xs:element name='type' type='xs:int'/&gt;
       &lt;xs:element name='text' type='xs:string'/&gt;
       &lt;xs:element name='date' type='xs:string'/&gt;
       &lt;xs:element name='corr' type='xs:int'/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
    &lt;/xs:schema&gt;
   &lt;/types&gt;
   &lt;message name='Gator_Gator'&gt;
    &lt;part element='tns:Gator' name='Gator'&gt;&lt;/part&gt;
   &lt;/message&gt;
   &lt;message name='Gator_GatorResponse'&gt;
    &lt;part element='tns:GatorResponse' name='GatorResponse'&gt;&lt;/part&gt;
   &lt;/message&gt;
   &lt;message name='GatorFault'&gt;
    &lt;part element='tns:GatorFault' name='GatorFault'&gt;&lt;/part&gt;
   &lt;/message&gt;
   &lt;portType name='Gator'&gt;
    &lt;operation name='Gator' parameterOrder='Gator'&gt;
     &lt;input message='tns:Gator_Gator'&gt;&lt;/input&gt;
     &lt;output message='tns:Gator_GatorResponse'&gt;&lt;/output&gt;
     &lt;fault message='tns:GatorFault' name='GatorFault'&gt;&lt;/fault&gt;
    &lt;/operation&gt;
   &lt;/portType&gt;
   &lt;binding name='GatorBinding' type='tns:Gator'&gt;
    &lt;soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/&gt;
    &lt;operation name='Gator'&gt;
     &lt;soap:operation soapAction='http://home.com/gatorws/ws/Gator/Gator'/&gt;
     &lt;input&gt;
      &lt;soap:body use='literal'/&gt;
     &lt;/input&gt;
     &lt;output&gt;
      &lt;soap:body use='literal'/&gt;
     &lt;/output&gt;
     &lt;fault name='GatorFault'&gt;
      &lt;soap:fault name='GatorFault' use='literal'/&gt;
     &lt;/fault&gt;
    &lt;/operation&gt;
   &lt;/binding&gt;
   &lt;service name='Gator'&gt;
    &lt;port binding='tns:GatorBinding' name='GatorImplPort'&gt;
     &lt;soap:address location='https://10.0.2.2:8080/gatoryws/Gator?wsdl'/&gt;
    &lt;/port&gt;
   &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>I am just being able to get a fail answer from the webservice.</p>
  
  <p>I tried <a href="http://www.wsdl2code.com" rel="nofollow">http://www.wsdl2code.com</a> but that's for .NET webservices.</p>
  
  <p>I also tried <a href="http://easywsdl.com/" rel="nofollow">http://easywsdl.com/</a> but I don't understand how it works in my case.</p>
  
  <p>Is there another tool that I could use?
  Should I migrate to Android Studio?</p>