title: ComplexityObject ksoap2 Android Magento error
body: <p>I'm trying to use ksoap2 in order to create an order on a remote Magento installation. I'm able to perform basic operations with the SOAP v2 Api but I got stuck on a complexity object.</p>
  
  <p>This is the part of the wsdl I'm trying to interface with</p>
  
  <pre><code>&lt;complexType name="shoppingCartProductEntityArray"&gt;
  &lt;complexContent&gt;
  &lt;restriction base="soapenc:Array"&gt;
  &lt;attribute ref="soapenc:arrayType" wsdl:arrayType="typens:shoppingCartProductEntity[]"/&gt;
  &lt;/restriction&gt;
  &lt;/complexContent&gt;
  &lt;/complexType&gt;
  &lt;complexType name="shoppingCartProductResponseEntityArray"&gt;
  &lt;complexContent&gt;
  &lt;restriction base="soapenc:Array"&gt;
  &lt;attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductEntity[]"/&gt;
  &lt;/restriction&gt;
  &lt;/complexContent&gt;
  &lt;/complexType&gt;
  .....
  &lt;message name="shoppingCartProductAddRequest"&gt;
  &lt;part name="sessionId" type="xsd:string"/&gt;
  &lt;part name="quoteId" type="xsd:int"/&gt;
  &lt;part name="products" type="typens:shoppingCartProductEntityArray"/&gt;
  &lt;part name="storeId" type="xsd:string"/&gt;
  &lt;/message&gt;
  .....
  &lt;operation name="shoppingCartProductAdd"&gt;
  &lt;documentation&gt;Add product(s) to shopping cart&lt;/documentation&gt;
  &lt;input message="typens:shoppingCartProductAddRequest"/&gt;
  &lt;output message="typens:shoppingCartProductAddResponse"/&gt;
  &lt;/operation&gt;
  </code></pre>
  
  <p>I tried the following</p>
  
  <pre><code>env = getEnvelope();
  request = new SoapObject(NAMESPACE, MethodName_AddProduct);
  request.addProperty("sessionId",_SessionId );
  
  SoapObject SingleProduct = new SoapObject(NAMESPACE, "shoppingCartProductEntity");
  PropertyInfo pi = new PropertyInfo();
  pi.setName("product_id");
  pi.setValue(Products[0][0]);
  pi.setType(String.class);
  
  SingleProduct.addProperty(pi);
  
  pi = new PropertyInfo();
  pi.setName("sku");
  pi.setValue(Products[0][1]);
  pi.setType(String.class);
  
  SingleProduct.addProperty(pi);
  
  pi = new PropertyInfo();
  pi.setName("qty");
  pi.setValue(1);
  pi.setType(Double.class);
  SingleProduct.addProperty(pi);
  
  SoapObject EntityArray = new SoapObject(NAMESPACE, "shoppingCartProductEntityArray");
  EntityArray.addProperty("productData",SingleProduct);
  
  request.addProperty("quoteId",cartId);
  request.addProperty("productsData",EntityArray);
  env.setOutputSoapObject(request);
  androidHttpTransport = new HttpTransportSE(URL);
  androidHttpTransport.call(SoapAction_AddProduct, env);
  </code></pre>
  
  <p>But I get the following message</p>
  
  <blockquote>
    <p>SoapFault - faultcode: '1021' faultstring: 'Product's data is not
    valid.' faultactor: 'null' detail: null</p>
  </blockquote>
  
  <p>I've also tried to print the request that seems correctly formatted to me</p>
  
  <blockquote>
    <p>DEBUG REQUEST :
    shoppingCartProductAdd{sessionId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    quoteId=31; productsData=shoppingCartProductEntityArray{productData=shoppingCartProductEntity{product_id=1;
    sku=PLM01; qty=1; }; }; }</p>
  </blockquote>