Actually that's not quite true about it being the first help request. This path 
has been previously blazed near 12 months ago with iMediMinder 
(http://www.itunes.com/apps/iMediMinder ) .

On 22/01/2011, at 1:05 AM, Doc Tag wrote:

> Thanks for the reply.  I'll look at the CCR XML again.
> 
> Eventually we will releasing the app under an open source license.
> Will let you know how things work out.
> 
> DT
> 
> On Jan 21, 1:31 am, Bess Ho <[email protected]> wrote:
>> Hi Doc,
>> 
>> I believe you are one of the very first to ask help on Objective-C in using
>> Google Health API.
>> 
>> 500 is a server error, not a client error.
>> 
>> The server failed to fulfill an apparently valid request. 500 Internal
>> Server Error - A generic error message, given when no more specific message
>> is suitable.
>> 
>> If you can post without Child it indicates API works. Now 500 error
>> indicates server won't accept the request. You need to review your CCR XML
>> to see if you are sending something that API won't accept. You can add more
>> debugging or error handling statements to help you identify the problem
>> areas.
>> 
>> Are you planing to open source your iOS app?
>> 
>> 
>> 
>> 
>> 
>> On Thu, Jan 20, 2011 at 6:33 PM, Doc Tag <[email protected]> wrote:
>>> We currently have a read-only objective-c app for GoogleHealth and are
>>> trying to integrate posting capability using the current API.  Other
>>> than a very simple record we are unable to post consistently.
>> 
>>> Below is the code we are using.
>> 
>>> (The service below is the same service used for fetching and is
>>> obtained through ClientLogin authentication.  The object root,
>>> referenced below, is an GDataXMLElement.)
>>> ------------------------------------------------------
>> 
>>> //Create CCR
>>> GDataContinuityOfCareRecord* newCCR =
>>>                                        [GDataContinuityOfCareRecord
>>> objectWithXMLElement:root];
>> 
>>> //Create health register entry
>>> GDataEntryHealthRegister* entry = [GDataEntryHealthRegister
>>> registerEntry];
>>> [entry setContinuityOfCareRecord:newCCR];
>> 
>>> //Get register feed url
>>> GDataEntryHealthProfile* profile = [profileList objectAtIndex:0];
>>> NSString* profileID = [[profile content] stringValue];
>>> NSURL* registerFeedURL =
>>>            [GDataServiceGoogleHealthSandbox
>>> registerFeedURLForProfileID:profileID];
>> 
>>> //Insert entry
>>> [self.service fetchEntryByInsertingEntry:entry
>>>                                        forFeedURL:registerFeedURL
>>>                                            delegate:self
>> 
>>> didFinishSelector:@selector(insertTicket:finishedWithEntry:error:)];
>> 
>>> -----------------------------------------------
>> 
>>> When root is a simple GDataXMLElement, without any children, posting
>>> to the sandbox appears to work.  A notice is generated in the sandbox
>>> indicating that the post has been received.  The XML fragment for the
>>> simple element is:
>> 
>>> GDataXMLElement* root = [GDataXMLElement
>>> elementWithName:@"ContinuityOfCareRecord"];
>> 
>>> GDataXMLNode* attribute = [GDataXMLNode attributeWithName:@"xmlns"
>>> stringValue:@"'urn:astm-org:CCR'"];
>> 
>>> [root addAttribute:attribute];
>> 
>>> If even a single child is added to the root an error is generated (500
>>> error).  Sample code for this fragment would be the above XML plus:
>> 
>>> childNode = [GDataXMLNode elementWithName:@"Body"];
>>> [root addChild:childNode];
>> 
>>> Based on debugging a valid CCR is being generated.  Any help on why
>>> these tags are being rejected would be appreciated.
>> 
>>> Thanks in advance,
>>> DT
>> 
>>> --
>>> 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]<googlehealthdevelopers% 
>>> [email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/googlehealthdevelopers?hl=en.
>> 
>> --
>> Bess Ho
>> UI Architect / Developer / Designer
>> iPhone Developer
>> Silicon Valley Web Builder (SVWB) Founder
>> 
>> The information transmitted is intended only for the person or entity to
>> which it is addressed and may contain CONFIDENTIAL material. If you receive
>> this material/information in error, please contact the sender and delete or
>> destroy the material/information.
> 
> -- 
> 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.
> 

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