No one has an idea?
On 22 aug, 14:00, Wouter <wouterg...@gmail.com> wrote:
> Hey,
>
> I am using the android xmlrpc client (http://code.google.com/p/android-
> xmlrpc/) to consume a xml-rpc webservice.
>
> I can call the webservice and get data back but I want to save the
> received data in own made Objects.
>
> For example:
>
> I want to get the movieScore:
>
> public void getMovieScore()
> {
> Object[] params = {sessionKey, 500};
> try {
> Map<String, Object> response = (Map<String, Object>)
> client.call
> ("film.retrieveScore",params);
>
> for (Iterator it=response.keySet().iterator();
> it.hasNext(); ) {
> Object key = it.next();
> Object value = response.get(key);
> }
>
> Log.d("FILM", "FILM: " + response.keySet());
> } catch (XMLRPCException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
>
> I use Map<String, Object> response = (Map<String, Object>) client.call
> ("film.retrieveScore",params);
> but i can also use Object or something else..
>
> When i debug this line of code I get this:
>
> http://www.grabup.com/uploads/b4823a93fd9733c2cb12fc6879a55b78.png?di...
>
> So the response is a HashMap.. and the reponse is this: {total=27253,
> votes=6503, average=4.19}
>
> How can I save these data in my class FilmScore (looks like this: )
>
> public class FilmScore {
>
> public String votes;
> public String total;
> public String average;
>
> }
>
> Can someone help me? Thank you,
>
> Wouter
--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---