This is the healthsample.java code with a few modifications.  It goes
to the point
were it sets up the feed to read profile data.  The entries in the
feed seem to be null.

Any Suggestions?

I have added the code below (in case I have shot myself in the foot).

Thanks

Herb Rush




//BUILD QUERY TO GET PROFILE
    Query query = null;
    try {
                  String url1 = new String("https://www.google.com/h9/
feeds/profile/default");
        String url2 = new String("https://www.google.com/health/feeds/profile/
default");
        String url3 = new String("https://www.google.com/h9/feeds/profile/
list");
        query = new Query(new URL(url3));
        query.addCustomParameter(new Query.CustomParameter("digest",
"true"));
    } catch (MalformedURLException e) {
        throw new HealthSampleException("Bad profile URL!", e);
    }

    //SET UP THE FEED TO PROCESS RESULTS
    Feed result =  null;
    try {
        result = h9Service.getFeed(query, Feed.class);
    } catch (Exception e) {
         throw new HealthSampleException("Error retrieving profile", e);
    }

    StringBuffer sb = new StringBuffer();
    try {
       if(result != null) {
         System.out.println("Query result not null - thats good");
       }
       // We used the digest=true parameter, so there should only
      // be a single Atom entry that contains all of the CCR data in
profile.
     for (Entry entry : result.getEntries()) {
        System.out.println(entry.getXmlBlob().getBlob());

--~--~---------~--~----~------------~-------~--~----~
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