Mailing List CGatePro@mail.stalker.com Message #98395
From: Noah Lehmann-Haupt <nlh@gothamdreamcars.com>
Subject: XIMSS / web interface to Calendar Question...
Date: Mon, 27 Jul 2009 07:19:24 -0700
To: <CGatePro>
X-Mailer: CommuniGate Pro MAPI Connector 1.52.13.1/1.52.14.1
Hi folks,

Trying to test out a web interface to a CGPro-based calendar.  Basically I have a web app that will be dumping events into a calendar to be accessed by local users running Outlook w/ MAPI client.

I think that XIMSS is the best way to do this (unless I'm missing something obvious?).  Protocol seems pretty straightforward.

BUT -- the kicker is this:  The calendar that uses those events has a custom Outlook form.  From what I've read, there's no way for iCalendar/vCalendar to do anything with those custom forms.  

I tried accessing the calendar as a folder instead of a calendar and placing the new events in the same way they seem to be stored (as emails w/ MIME attachments) -- but because of good 'ol winmail.dat, even if I could do that there's no way to easily encode the winmail.dat custom form data.

SO -- I've given up on that approach -- my best bet now seems to be to just place generic iCalendar items into the calendar via XIMSS and code up the default Outlook form to automatically switch to my custom form upon loading on the client side.  Fine.  So I'm now tackling a simpler problem:

When I place events into the calendar via XIMSS, I'd like to at the very least be able to set some fields to change the color of those events (the 'label' field).

This seems to be handled with an "X-Mapi-Label" tag in the vCalendar object.

BUT -- try as I might, XIMSS doesn't seem to let me publish an item with this tag.  It just ignores it.

Specific question #1 -- Is there a particular reason that XIMSS seems to ignore the <X-Mapi-Label> tags?  Anything I can do to remedy this?  Is it just a bug?

Some code may help.  I'm sending the following message:

<calendarPublish id="A001" calendar="Test Calendar">
      <iCalendar xmlns="urn:ietf:params:xml:ns:xcal">
        <vCalendar method="PUBLISH" prodid="CommuniGate XIMSS Interface" version="2.0">
          <vevent localTime="20090805">
            <organizer>MAILTO:test@test.com</organizer>
            <dtstamp>20090726T180135Z</dtstamp>
            <uid>2387423845273645726345576</uid>
            <sequence>0</sequence>
            <summary>An XIMSS Event Test</summary>
            <dtstart value="DATE">20090806</dtstart>
            <dtend value="DATE">20090808</dtend>
            <transp>TRANSPARENT</transp>
            <busystatus>FREE</busystatus>
            <priority>5</priority>
            <STATUS>CONFIRMED</STATUS>
            <X-MAPI-LABEL>9</X-MAPI-LABEL>
          </vevent>
        </vCalendar>
      </iCalendar>
</calendarPublish>

And it gets accepted w/ a response:

<calendarReport calendar="Test Calendar" mode="notify"/>
<response id="A001"/>

Which is good.  The event appears in the calendar, pops up in Outlook, but the "X-Mapi-Label" has been ignored.

If I do a dump of the event, I get the following back from the server

<calendarMessage calendar="Test Calendar" id="A002" UID="2743">
  <EMail>
    <From>test@test.com</From>
    <Subject>Latest XIMSS Test</Subject>
    <Date localTime="20090726T140135" timeShift="-14400">20090726T180135Z</Date>
    <Message-ID>&lt;4985643785456436867&gt;</Message-ID>
    <MIME charset="utf-8" class="appointment" estimatedSize="453" subtype="calendar" type="text" Type-method="PUBLISH" Type-name="meeting.ics">
      <iCalendar xmlns="urn:ietf:params:xml:ns:xcal">
        <vCalendar method="PUBLISH" prodid="CommuniGate Pro 5.2.14" version="2.0">
          <vevent localTime="20090806">
            <organizer CN="test@test.com">MAILTO:test@test.com </organizer>
            <dtstamp>20090726T190456Z</dtstamp>
            <uid>4985643785456436867</uid>
            <sequence>0</sequence>
            <summary>Latest XIMSS Test</summary>
            <dtstart value="DATE">20090806</dtstart>
            <dtend value="DATE">20090808</dtend>
            <busystatus>FREE</busystatus>
            <lastModified>20090726T190358Z</lastModified>
            <created>20090726T190358Z</created>
            <priority>5</priority>
          </vevent>
        </vCalendar>
      </iCalendar>
    </MIME>
  </EMail>
</calendarMessage>


So as you can see, CGPro seems to have converted my published object into an email message and lost my "X-Mapi-Label" attribute.

Any thoughts / ideas?  Has anyone played with this stuff and encountered a similar problem?  Am I even taking the right approach or is there an easier way to accomplish what I'm trying to do (i.e. let my web app publish events to my CGPro calendar).

Thanks in advance!

--Noah



Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster