Search code examples
androidweb-servicesksoap2

I want to send key-pair values in soap web Service using ksoap2 library in android


I want to send key-pair values in soap web Service using ksoap2 library in android. For this I used the below code

Hashtable hashtable = new Hashtable();
hashtable.put("is_report", false);
hashtable.put("r_how", 1); 
request = new SoapObject(NAMESPACE,METHODE);
request.addProperty("params",hashtable);
SoapSerializationEnvelope env = new SoapSerializationEnvelope(SoapEnvelope.VER11); 

 HttpTransportSE androidHttpTransport = new HttpTransportSE("xxxxxxxxxx"); 
 env.setOutputSoapObject(request)
(new MarshalHashtable()).register(env); 
 androidHttpTransport.call("", env);
 Object product_update = enve.getResponse();
 Log.d("Response "," "+product_update.toString());

I got the response from server as 'true' but the data does not updated. What is wrong in the code?


Solution

  • You should read this: Adding an array of complex objects to the request.