vijay

welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Wednesday, July 11, 2012

Null values return anyType{} in KSoap2 response in android


Recently I had been work with android webs service application; in one scenario I have come acress certain problems.
In webservice after I got the response in soapobject ,I retrieve data and store into edittext.
For Null or empty values its shows as anyType{} in edit text. I don’t like this one display it on
Edit text.

For solve this case we need to check the string has contains the value anyType{},if its then we make into empty..I have used the below code to check

if (!response.getProperty(3).toString().equals("anyType{}")) name.setText(response.getProperty(3).toString());

First I have check the response contains anyType{} ,if its not then I set the value to Edittext.
So if anyone come across such a problem use above code to solve the issues..
Share your knowledge to save the time.
Keep reading………..

0 comments:

Post a Comment