Hello i am developing an Android app which uses Magento as the backend and i am using SOAP webervice of magento, I have added all the product , customer and customer address information to the cart , But when i try to add the shipping method to the cart , I am getting this error
SoapFault - faultcode: '1062' faultstring: 'Shipping method is not available'
This is the code i am trying with , Please help me to resolve this
SoapObject availableShippingMethods = new SoapObject(MAGENTO_NAMESPACE, "shoppingCartShippingList");
availableShippingMethods.addProperty("sessionId", sessionId);
availableShippingMethods.addProperty("quoteId", quoteId);
env.setOutputSoapObject(availableShippingMethods);
androidHttpTransport.call("", env);
Object resultForAvailableShippingMethods = env.getResponse();
Log.d("AvailableShippingMethods",resultForAvailableShippingMethods.toString());
This will give us this output
D/AvailableShippingMethods﹕ shoppingCartShippingMethodEntityArray{item=shoppingCartShippingMethodEntity{code=flatrate_error; carrier=flatrate; carrier_title=Flat Rate; price=0; }; }
below is the code which sets Shipping method to the CartId
SoapObject shippingmethod = new SoapObject(MAGENTO_NAMESPACE, "shoppingCartShippingMethod");
shippingmethod.addProperty("sessionId", sessionId);
shippingmethod.addProperty("quoteId", quoteId);
shippingmethod.addProperty("shippingMethod", "flatrate_error");//Code for Flatrate shipping method and it is enabled in magento site
env.setOutputSoapObject(shippingmethod);
androidHttpTransport.call("", env);
Log.d("shippingMethod", shippingmethod.toString());
Object resultforShippingMethod = env.getResponse();
Log.d("ShippingMethod", resultforShippingMethod.toString());