android - Passing an associative array from Java to PHP -


i trying pass associative array java php. getting "can not serialize exception."

the backend php code(soap call) this:

function gettrips($data) {       foreach($data $key => $value)     {       ...     }   } 

i making java client call this:

hashmap<string, string> data = new hashmap<string, string>();          data.put("start_date", dateformat.format(date));         data.put("end_date", dateformat.format(date));         data.put("loc", "1");          request.addproperty("data",data );          soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11);          envelope.setoutputsoapobject(request);         httptransportse androidhttptransport = new httptransportse(url);         androidhttptransport.call(soap_action, envelope); 

i tried namevaluepair code this:

    list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(6);              namevaluepairs.add(new basicnamevaluepair("start_date", dateformat.format(date)));              namevaluepairs.add(new basicnamevaluepair("end_date", dateformat.format(date))); request.addproperty("data",namevaluepairs ); 


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -