I am using magento soap api to add shipping and billing address as
" SoapObject item1 = new SoapObject(NAMESPACE, "shoppingCartCustomerAddressEntity");
PropertyInfo pinfo = new PropertyInfo();
pinfo.setName("mode");
pinfo.setValue("shipping");
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("firstname");
pinfo.setValue(firstname1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("lastname");
pinfo.setValue(lastname1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("company");
pinfo.setValue(company1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("street");
pinfo.setValue(street1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("city");
pinfo.setValue(city1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("region");
pinfo.setValue(region1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("postcode");
pinfo.setValue(postcode1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("country_id");
pinfo.setValue(country1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("telephone");
pinfo.setValue(telephone1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("fax");
pinfo.setValue(fax1);
pinfo.setType(String.class);
item1.addProperty(pinfo);
pinfo = new PropertyInfo();
pinfo.setName("is_default_shipping");
pinfo.setValue(1);
pinfo.setType(Integer.class);
item1.addProperty(pinfo);
SoapObject entityArray = new SoapObject(NAMESPACE, "shoppingCartCustomerAddressEntityArray");
entityArray.addProperty("customer",item1);
SoapObject item2 = new SoapObject(NAMESPACE, "shoppingC");
PropertyInfo pinfo1 = new PropertyInfo();
pinfo1.setName("mode");
pinfo1.setValue("billing");
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("firstname");
pinfo1.setValue(firstname1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("lastname");
pinfo1.setValue(lastname1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("company");
pinfo1.setValue(company1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("street");
pinfo1.setValue(street1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("city");
pinfo1.setValue(city1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("region");
pinfo1.setValue(region1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("postcode");
pinfo1.setValue(postcode1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("country_id");
pinfo1.setValue(country1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("telephone");
pinfo1.setValue(telephone1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("fax");
pinfo1.setValue(fax1);
pinfo1.setType(String.class);
item2.addProperty(pinfo1);
pinfo1 = new PropertyInfo();
pinfo1.setName("is_default_billing");
pinfo1.setValue(0);
pinfo1.setType(Integer.class);
item2.addProperty(pinfo1);
SoapObject entityArray2 = new SoapObject(NAMESPACE, "shoppingCartCustomerAddressEntityArray");
entityArray2.addProperty("customer",item2);
Log.e("itemsad2222", entityArray2.toString());
SoapObject entityArray3 = new SoapObject(NAMESPACE, "shoppingCartCustomerAddressEntityArray");
entityArray3.addProperty("customer",entityArray);
entityArray3.addProperty("customer",entityArray2);
SoapObject request = new SoapObject(NAMESPACE, "shoppingCartCustomerAddresses");
request.addProperty("sessionId", SessionId);
request.addProperty("quoteId", CartId);
request.addProperty("customer",entityArray3);"
but its not adding and giving exception customer address data is empty
Help me out please...it took a day but i still could not find anythng