android - How to pass a String array to a webservice using soap libraries? -
i need pass a string array predefined webserivce designed accept array of string values. when create soap envelope , set array.class or string.class properties request throws serialization error.
any suggestions above? should suggested data type or method work around same.
soapobject request = new soapobject(wsdl_target_namespace,operation_name); propertyinfo p1 = new propertyinfo(); p1.setname("items"); p1.setvalue(results); p1.settype(string.class); // else array.class. request.addproperty(p1); soapserializationenvelope envelope = new soapserializationenvelope(soapenvelope.ver11); envelope.setoutputsoapobject(request); envelope.dotnet = true; httptransportse httptransport = new httptransportse(soap_address); httptransport.debug = true; httptransport.call(soap_action, envelope); // throws error in above. result = httptransport.responsedump;
it known issue ksoap2 android library, @ moment doesn't support arrays. issue description here.
a third-party patch, solution , example can found here.
look on these link, can find answer on that.
Comments
Post a Comment