I am using "shoppingCartProductRemove" api to remove an item from cart in magento. For that i am using the following code:
SoapObject item = new SoapObject(NAMESPACE,"shoppingCartProductEntity");
PropertyInfo pinfo = new PropertyInfo();
String productid = productId.get(deleteProductPosition);
pinfo.setName("product_id");
pinfo.setValue(productid);
pinfo.setType(String.class);
item.addProperty(pinfo);
pinfo = new PropertyInfo();
String productsku = productSku.get(deleteProductPosition);
pinfo.setName("sku");
pinfo.setValue(productsku);
pinfo.setType(String.class);
item.addProperty(pinfo);
pinfo = new PropertyInfo();
int productQty = Qty.get(deleteProductPosition);
pinfo.setName("qty");
pinfo.setValue(productQty);
pinfo.setType(Double.class);
item.addProperty(pinfo);
SoapObject EntityArray = new SoapObject(NAMESPACE,"shoppingCartProductEntity");
EntityArray.addProperty("productsData", item);
SoapObject request = new SoapObject(NAMESPACE, "shoppingCartProductRemove");
request.addProperty("sessionId", sessionId);
request.addProperty("quoteId", 118);
request.addProperty("productsData", item);
env.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call("", env);
Object catrInfoObjs = env.getResponse();
but i am getting the xml pullparser exception. Is there any reference to remove an item from cart. Need help here!!
I got it using the following code: