As mentioned, there's a bug in the H9Service constructor:
http://code.google.com/p/gdata-java-client/issues/detail?id=91

Eric

On Dec 9, 6:24 pm, John Hall <[email protected]> wrote:
> Jason, I've inlined some code below.  Replace username and password
> appropriately, and the sample should display a list of profile names
> associated with that account in H9 using ClientLogin.
>
> -----------BEGIN GoogleH9ClientLoginProfileLister.java-----------
> package com.mttaboros.test;
>
> import com.google.gdata.client.GoogleService;
> import com.google.gdata.client.Query;
> import com.google.gdata.data.Feed;
> import com.google.gdata.data.Entry;
>
> import java.net.URL;
>
> /*
>  * This is a simple utility to read an H9 profile feed using
> ClientLogin.
>  * Modify username and password appropriately in main().
>  *
>  * Usage:
>  * java com.mttaboros.test.GoogleH9ClientLoginProfileLister
>  *
>  */
>
> public class GoogleH9ClientLoginProfileLister {
>
>     public static void main(String[] args) throws Exception {
>         String username = "username";
>         String password = "password";
>
>         GoogleService service = new GoogleService("weaver", "mttaboros-
> profilelister-1.0");
>         service.setUserCredentials(username, password);
>
>         Query query = new Query(new URL("https://www.google.com/h9/
> feeds/profile/list"));
>         Feed feed = service.getFeed(query, Feed.class);
>         for (Entry entry : feed.getEntries()) {
>             System.out.println(entry.getTitle().getPlainText());
>         }
>     }}
>
> -----------END GoogleH9ClientLoginProfileLister.java-----------
>
> --
> John Hall
> Mount Tabor
>
> On Dec 9, 2:22 pm, JCN <[email protected]> wrote:
>
> > Or GoogleService, with "weaver" in the constructor.
>
> > Something that I could ideally replace my username and password and
> > compile and run and see it work. I'm unable to get the sandbox working
> > using the Java API.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health 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/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to