pareshy
pareshy

Reputation: 341

GETTING RESPONSE FROM WEBSERVICE

I am new for android as well as new for webservices..Kindly help me out

anyType{Users=anyType{FirstName=gkdgkfdgzff; LastName=hfhff; PhnNumber=hdd; CreditCard=gdjd; Email=dhd; Country=gdhd; }; }

I am getting this response from the webservice, how can I extract values from it and can store in variables?? My webservices are written in the asp.net c# Thanks in Advance

Upvotes: 1

Views: 280

Answers (2)

Pradeep Pati
Pradeep Pati

Reputation: 5919

I believe you are using ksoap2 as the webservice consumer and in that case, there is nothing wrong with the response that you have received as ksoap2 formats the output that way. Follow the code sample in this tutorial to extract the values from the response.

Upvotes: 0

Daniel Conde Marin
Daniel Conde Marin

Reputation: 7742

One of the purposes of WebServices are for allowing the possibility of consuming the exposed data from any platform, that's why the response when you consume it, it comes in formats that every platform has libraries to process(like json), so the fact that is written in asp.net c# is not that important. In Android case parsing responses in Json format is pretty easy by using org.json library, Assuming your response is in json format, wish in your case is not correctly formatted, then here is a link where I expose a way for parsing a response.

Edit: Here is a link for a RestClient I developed myself wich you can use to consume any exposed data via classic http methods(GET and POST). Hope this helps.

Upvotes: 2

Related Questions