web services - how to get the values from soap response in android? -
the next xml tag webservice response ,i dont know how parse it..help me..
<newdataset> <joblist> <csidno>cs13224</csidno> <pname>selva</pname> <houseid>g 34</houseid> <name>dilipan</name> <address>coimbatore</address> </joblist> <joblist> <csidno>cs13224</csidno> <pname>selva</pname> <houseid>g 35</houseid> <name>kanrupannan</name> <address>coimbatore</address> </joblist> </newdataset>
i using next java code .....
for(int i=0;i<result.getpropertycount();i++) { soapobject ob=(soapobject)result.getproperty(i); homeid[i]=string.valueof(ob.getproperty("houseid")); namearr[i]=string.valueof(ob.getproperty("name")); address[i]=string.valueof(ob.getproperty("address")); csidno[i]=string.valueof(ob.getproperty("csidno")); }
how values form xml tag..
its pretty simple have respose string , utilize pattern matches extract detail needed>please see post hope helps , understand it.
string r = namearray.columncount("userid", limitstart, loadnumber,loggername); string temp = r.replaceall(";\\s", ",").replaceall("string=", " ") .replace("anytype{", "").replace(",}", ""); come in code here
check link step step instruction http://amalan008.blog.com/2013/02/07/how-to-process-an-array-returned-by-a-wsdl-android/
android web-services ksoap2
No comments:
Post a Comment