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?direct

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to