Mailing List CGatePro@mail.stalker.com Message #99411
From: Chris Tate-Davies <chris.tatedavies@inflightproductions.com>
Subject: XMISS - Add calendar item
Date: Wed, 10 Feb 2010 10:20:11 -0800
To: <CGatePro>
Hello.

I'm using PHP to connect to our mail server. I can get a list of calendar events using the findEvents command - this works fine,

I cannot add an item. I get the response, "XML sytnax error: unexpected end of data" error 500 - but I don't know what part is wrong. The below is the item I am trying to add (with usernames and passwords removed ($el = "/0")

fwrite($sock, '<login id="A001" authData="<username>" password="<password>" />'.$el);
    fwrite($sock, '<calendarOpen id="A003" calendar="Calendar" />'.$el);
    fwrite($sock, '<calendarPublish id="A021" calendar="Calendar">'.$el);
    fwrite($sock, '<iCalendar xmlns="urn:ietf:params:xml:ns:xcal">'.$el);
    fwrite($sock, '<vCalendar method="PUBLISH" prodid="CommuniGate Pro 5.1.7" version="2.0">'.$el);
    fwrite($sock, '<vevent>'.$el);
    fwrite($sock, '<organizer CN="Chris">MAILTO:chris.tatedavies@inflightproductions.com</organizer>'.$el);
    fwrite($sock, '<rrule>FREQ=WEEKLY;BYDAY=MO,TH</rrule>'.$el);
    fwrite($sock, '<dtstamp>20061022T091143Z</dtstamp>'.$el);
    fwrite($sock, '<sequence>0</sequence>'.$el);
    fwrite($sock, '<summary>Report Meeting</summary>'.$el);
    fwrite($sock, '<dtstart tzid="Europe/Central">20100215T100000</dtstart>'.$el);
    fwrite($sock, '<dtend tzid="Europe/Central">20100215T110000</dtend>'.$el);
    fwrite($sock, '<busystatus>BUSY</busystatus>'.$el);
    fwrite($sock, '<last-modified>20060516T034850Z</last-modified>'.$el);
    fwrite($sock, '<created>20060516T034850Z</created>'.$el);
    fwrite($sock, '<priority>5</priority>'.$el);
    fwrite($sock, '<description>A TEST Calendar item from CTD.</description>'.$el);
    fwrite($sock, '</vevent>'.$el);
    fwrite($sock, '</vCalendar>'.$el);
    fwrite($sock, '</iCalendar>'.$el);
    fwrite($sock, '</calendarPublish>'.$el);
    fwrite($sock, '<bye id="A004" />'.$el);

Any help or guidance would be appreciated.

Chris



Registered Office: 15 Stukeley Street, London WC2B 5LT, England. Registered in England number 1421223

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Please note that the information provided in this e-mail is in any case not legally binding; all committing statements require legally binding signatures.

http://www.inflightproductions.com
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster