android - Trying to send a Hashmap array with web service -
i'm trying send array contains hashmap<string,object> using web service in android, i'm having exception says "can not serialize hashmap", hope me guys. in advance! here web service class below:
public class adduser { string namespace = "the name space"; private string url = "the url"; string soap_action; soapobject request; soapserializationenvelope envelope; androidhttptransport androidhttptransport; adduser() { } //set envelope protected void setenvelope() { try { envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.dotnet = true; envelope.setoutputsoapobject(request); androidhttptransport = new androidhttptransport(url); androidhttptransport.debug = true; } catch (exception e) { system.out.println("soap exception---->>>" + e.tostring()); } } public string setficheuser(string methodname,object full_tab) { try { soap_action = "the soap action"; //adding values request object request = new soapobject(namespace, methodname); propertyinfo prop = new propertyinfo(); prop.setname("user"); prop.setvalue(full_tab); prop.settype(object.class); request.addproperty(prop); setenvelope(); try { androidhttptransport.call(soap_action, envelope); object result = (object)envelope.getresponse(); return ""; } catch (exception e) { // todo: handle exception return e.tostring(); } } catch (exception e) { // todo: handle exception return e.tostring(); } } }
Comments
Post a Comment