Well I ran all strings through a httpencode function, and now I get the message "content is not allowed in prolog".
I include the http post from the sniffer. Note that I used the example from the documentation, except that I changed the date. Any idea where I should look for the problem ? Request POST http://www.google.com/calendar/feeds/default/private/full HTTP/ 1.0 Content-Type: application/atom+xml Content-Length: 876 Authorization: GoogleLogin Auth=DQAAAIwAAADCSgFCkPhBV8N7H2k_AFqsdHlZwjR1MtjLfKHqdZ5WVZR4cVQ_6C-4H3NEoTr4FBD1cumnkkNzlXzctUx3vkG5tqFklWADuA_buaHjC_s9F_fV984mB5BadzlAHk8QROtWv1NpStyRXwaECPILDLbsaWZKFKvaYyVw_CSP9I9R6wHPlAcNu3XSlvZrAeTACxc Proxy-Connection: keep-alive Host: www.google.com Accept: text/html, */* Accept-Encoding: identity User-Agent: Mozilla/3.0 (compatible; Indy Library) Cookie: S=calendar=tatnR6qJ7iYedro-EqP6Uw %3Centry+xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2005%2FAtom'&++++xmlns%3Agd %3D'http%3A%2F%2Fschemas.google.com%2Fg%2F2005'%3E&++%3Ccategory+scheme %3D'http%3A%2F%2Fschemas.google.com%2Fg%2F2005%23kind'&++++term%3D'http %3A%2F%2Fschemas.google.com%2Fg%2F2005%23event'%3E%3C%2Fcategory%3E&++ %3Ctitle+type%3D'text'%3ETennis+with+Beth%3C%2Ftitle%3E&++%3Ccontent +type%3D'text'%3EMeet+for+a+quick+lesson.%3C%2Fcontent%3E&++%3Cgd %3Atransparency&++++value%3D'http%3A%2F%2Fschemas.google.com%2Fg %2F2005%23event.opaque'%3E&++%3C%2Fgd%3Atransparency%3E&++%3Cgd %3AeventStatus&++++value%3D'http%3A%2F%2Fschemas.google.com%2Fg %2F2005%23event.confirmed'%3E&++%3C%2Fgd%3AeventStatus%3E&++%3Cgd %3Awhere+valueString%3D'Rolling+Lawn+Courts'%3E%3C%2Fgd%3Awhere%3E&++ %3Cgd%3Awhen+startTime%3D'2009-12-31T15%3A00%3A00.000Z'&++++endTime %3D'2009-12-31T17%3A00%3A00.000Z'%3E%3C%2Fgd%3Awhen%3E&%3C%2Fentry%3E Response : HTTP/1.0 400 Bad Request Expires: Fri, 01 Jan 2010 18:36:55 GMT Date: Fri, 01 Jan 2010 18:36:55 GMT Content-Type: text/html; charset=UTF-8 Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-XSS-Protection: 0 X-Frame-Options: SAMEORIGIN Server: GFE/2.0 Content is not allowed in prolog. On 30 dec 2009, 00:36, Ray Baxter <[email protected]> wrote: > I'm not sure exactly what encoding is going on, but this: > <entry xmlns=''http://www.w3.org/2005/Atom''%20xmlns:gCal=''http:// > schemas.google.com/gCal/2009''%3E%3Ccontent%20type=''html''%3ETennis > %20with%20John%20December%2023%203pm-3:30pm%3C/content%3E > %3CgCal:quickadd%20value=<http://schemas.google.com/gCal/2009''%3E%3Ccontent%20type=''html''%3E... > %20with%20John%20December%2023%203pm-3:30pm%3C/content%3E > %3CgCal:quickadd%20value=>"true"/%3E%3C/entry%3E > > is not a properly encoded version of this: > > <entry xmlns=''http://www.w3.org/2005/Atom'xmlns:gCal=''http:// > schemas.google.com/gCal/2009'><content type=''html''>Tennis > with John December 23 3pm-3:30pm</content> > <gCal:quickadd value="true"/></entry> > > Something weird is happening. > > Ray > > On Tue, Dec 29, 2009 at 10:03 AM, soitjes <[email protected]>wrote: > > > I try to create an event with the XML as proposed in the > > documentation, but I get this error : > > > Element type "entry" must be followed by either attribute > > specifications, "gt" or "/gt". > > > I don't understand, because I simply copy/pasted the example from the > > docs. I used a HTTP sniffer, and everything looks ok. This is what > > I see through the sniffer : > > > POSThttp://www.google.com/calendar/feeds/default/private/fullHTTP/ > > 1.0 > > Content-Type: application/atom+xml > > Content-Length: 239 > > Authorization: GoogleLogin > > > Auth=DQAAAIwAAAAjwxdsrskBLCGFfKWuWVjDOABOO01-9JPF6a8CTScDzlVpkDYEsTuAOHNtrljWZPi6g4LyZ6ZF4DjD4TKPLkBq2PWWjd_w- > > wT_g26HZyd4vvIGuIKGzFX41I- > > qdsGtQAT4LYAfpnLi2QXChtZcES8avCwgW2rL6g56KaVIQYNAzAGfpAyR5EX5a9xzFKuSFBI > > Proxy-Connection: keep-alive > > Host:www.google.com > > Accept: text/html, */* > > Accept-Encoding: identity > > User-Agent: Mozilla/3.0 (compatible; Indy Library) > > Cookie: S=calendar=CwvW3CvuE7otGK-KJWj5ng > > > <entry xmlns=''http://www.w3.org/2005/Atom''%20xmlns:gCal=''http:// > > schemas.google.com/gCal/2009''%3E%3Ccontent%20type=''html''%3ETennis > > %20with%20John%20December%2023%203pm-3:30pm%3C/content%3E > > %3CgCal:quickadd%20value="true"/%3E%3C/entry%3E > > > Does somebody see why I get this error ? > > > Thanks, > > > Soitjes. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Google Calendar Data API" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-calendar-help-dataapi%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-calendar-help-dataapi?hl=en.
-- You received this message because you are subscribed to the Google Groups "Google Calendar Data API" 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/google-calendar-help-dataapi?hl=en.
