On Monday 28 August 2006 16:55, Zac Morris (zmorris) wrote: > Hi Marco, apreciate the feedback but: > > http://support.microsoft.com/kb/q296126/ > > ...is regarding adding/deleting a contact, and doesn't have any > information the SUBSCRIBE method. > > I'm able to connect and query details perfectly, what I'm trying to do > is subscribe to "update/newmember" on the calendar folder such that if > anyone adds or changes items in their calendar I'll be notified and can > update my data with a new query. > > Everytime I try to issue a SUBSCRIBE my exchange server responds with > error 400 (Bad Request). > > Does anyone have an example of working SUBSCRIBE code using the webDAV > client in slide? That would let me know if the issue is in my code or > with the exchange server. > > I've gone to: > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2 > k3/_webdav_call_back_header.asp > > ...and tried their example which also give me error 400 so I'm guessing > it might have something to do with priviledges, but being so new to the > webDAV client I need to confirm that it's not something in my code. > > THANKS! > -Zac Morris > > >
Hi Zac, I have managed to successfully use the subscribe methods having slide server as backend ( never tried / needed to with exchange ). Basically, what I do is subscribe an instance of org.apache.webdav.lib.NotificationListener to the server this way systemListener.subscribe(method,ROOT,DepthSupport.DEPTH_INFINITY, SUBSCRIPTION_LIFETIME,NOTIFICATION_DELAY,systemSubscriber,systemCredentials) where 1 - systemListener is an instance of org.apache.webdav.lib.NotificationListener with a custom notify method 2 - method is a string that represents one of the supported methods by the server 3 - DepthSupport.DEPTH_INFINITY ... check the API ;) 4 - SUBSCRIPTION_LIFETIME is the lifetime (in milliseconds ) to keep the subscription alive, 5 - NOTIFICATION_DELAY is the delay is seconds between the notification and the action in response of the event 6 - systemSubscriber is an implementation of org.apache.webdav.lib.Subscriber with a custom notify method 7 - systemCredentials is an instance of UsernamePasswordCredentials for logging into the dav server . keep in mind that I had to activate the notification framework in slide ... in Domain.xml set <notification include-events="true" /> hope it helps. cheers Marco -- Q: What do you call a blind pre-historic animal? A: Diyathinkhesaurus. Q: What do you call a blind pre-historic animal with a dog? A: Diyathinkhesaurus Rex.
pgpVKdRJ0GuV9.pgp
Description: PGP signature
