Saturday, July 21, 2012

Re: [android-developers] Call web service that returns an object

the returned object  is a class (Category) and contains ID as integer, Name and description so what should i do to sync  the category class defined in both web service and the android app.

regards

On Thursday, July 19, 2012 9:22:29 PM UTC+3, TreKing wrote:
On Wed, Jul 18, 2012 at 9:15 AM, Mohammed Zarqa  wrote:
the error comes from this line             C.CategoryId =  Integer.parseInt(response.getProperty(0).toString());
and the error is java.lang.NumberFormatException: unable to parse 'anyType{CategoryId=10055; Name=my name;Description=my Desc;}' as integer

The error pretty much tells you exactly what the problem is. You can't parse this "anyType" to an Integer. So don't do that.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate