Oracle calendar to iPhone external calendar (.ics format)
This represents a bit of a rejigging of the
oracle_calendar.py to give Events the ability to turn themselves into iCalendar-style records. They also pick up vAlarms.
The Event output isn’t (yet) complete; most importantly, attendees aren’t re-serialized. However, it suffices to be able to provide a one-way output to an unjailbroken iPhone – or anything else that can consume the
This is coupled with a little flup-based AJP service. I originally used the flup fcgi WSGIServer instead; however, I was having trouble configuring it with Apache 2.2 and mod_fastcgi (I had multiple FastCGI services, only some of which I wanted to pass the HTTP_AUTHORIZATION through to. Looks like mod_fcgid manages all this a little better) so I wound up using the AJP connector instead – without a hitch.
The service requires HTTP-Basic authentication, which it passes through sight unseen to the Oracle Calendar “soap” service.
I’ve probably complained about that before now. It’s not really a SOAP service. It’s a mostly-incomplete access point that will let a user see only their own calendar (no proxy or delegate authentication options, no way to choose another visible calendar) that accepts a precisely-formatted sublanguage of valid SOAP requests; mostly by dint of being half-implemented with a hand-written parser, as far as I can tell. The parser, amongst other things, is extremely sensitive to having namespace declarations in the right place with the right prefixes, and so on. Oh, and if you see an empty calendar (and your server’s throwing
expat exceptions) that’s because Oracle calendar won’t always return well-formed XML. Mmm, taste the quality.
Anyway, this is enough to get simple calendar details slurpable through to an external calendar on the iPhone. It’s set up as follows:
<Proxy balancer://fcgi> BalancerMember ajp://cmjg.localhost:8642 </Proxy>
ProxyPass /some/url/path balancer://fcgi/some/url/path <Location /some/url/path> Allow from all </Location>
calendar.fcgi is launched externally to Apache.
I’ve run one of these up for testing and it suffices for an aide memoire; the iPhone turns vAlarms (of any kind, the ACTION:EMAIL ones that Oracle produces in particular) into bleeps and dings.