Friends,
I post XML CCR notice via localhost, using .NET API. The notice is
registered and I can see it when I login via h9. But the content XML
is absent. I do not get any exceptions. Apart from Session Token do I
need to send any unique identifier to register via API? I have tried
several types of notices and they don't get posted.

Can someone please help?

Here is the code:
void PostNotice()
        {

            GAuthSubRequestFactory authFactory = new
GAuthSubRequestFactory("weaver", "apex-WebApp-1");
            authFactory.Token = (String)Session["token"];
            Service service = new Service(authFactory.Service,
authFactory.ApplicationName);
            service.RequestFactory = authFactory;

            AtomEntry newNotice = new AtomEntry();

            newNotice.Title.Text = "Medication";
            newNotice.Content.Content = "Medication Data";

            XmlDocument ccrDoc = new XmlDocument();

            ccrDoc.LoadXml(xDoc.ToString()); // Load xml as a string
            XmlExtension ext = new XmlExtension
(ccrDoc.DocumentElement);
            newNotice.ExtensionElements.Add(ext);

            try {
                    service.Insert(new Uri("https://www.google.com/h9/
feeds/register/default"), newNotice);
                 }
                catch(Exception e)
                {
                    e.GetBaseException();
                }


        }
Here is the Notice XML file I am posting:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <!-- Sample XML
  -->
- <ContinuityOfCareRecord xmlns_x="urn:astm-org:CCR">
  <CCRDocumentObjectID>100</CCRDocumentObjectID>
- <Language>
  <Text>English</Text>
- <Code>
  <Value>en</Value>
  <CodingSystem>ISO-639-1</CodingSystem>
  </Code>
  </Language>
  <Version>1.0</Version>
- <DateTime>
  <ExactDateTime>2009-09-25T11:57:20Z</ExactDateTime>
  </DateTime>
- <Patient>
  <ActorID>Patient</ActorID>
  </Patient>
- <Body>
- <Medications>
- <Medication>
--~--~---------~--~----~------------~-------~--~----~
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