Hi,

I am developing an Java app wich communicate with Google Health. I
have no problems with inserting new entries or deleting it, but I have
a lot of problems updating a Profile entry. The problem is when I
execute the service.update(link, entry); it seems to work well, but in
Google Health the entry has been deleted and other new entry has been
created instead of it!!. I have proved it with simple code like not
changing anything at the entry. But I have the same problem.

An  example code :


HealthService healthService = new HealthService("HealthLogin");

healthService.setUserCredentials("[email protected]", "----");
String url = "https://www.google.com/health/feeds/profile/ui/-----";;
 ProfileFeed profileFeed = healthService.getFeed(new URL(url),
ProfileFeed.class);
 ProfileEntry entry2 = profileFeed.getEntries().get(0); //  It Gets
the first entry

String code =
entry2.getContinuityOfCareRecord().getXmlBlob().getBlob();
String codeWithFormat = ("<ContinuityOfCareRecord xmlns=" + '"' +
"urn:astm-org:CCR" + '"' + ">"
                + "\n" + code+ "\n" + "</
ContinuityOfCareRecord>" ); // Parses the code to be updated.
 XmlBlob b = new XmlBlob();
 b.setBlob(new String(codeWithFormat));

 entry2.getContinuityOfCareRecord().setXmlBlob(b);


healthService.update(new
URL(entry2.getEditLink().getHref()),entry2); // Update the entry

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