You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by "Zac Morris (zmorris)" <zm...@cisco.com> on 2006/08/26 00:20:46 UTC

Question regarding webDAV client and Subscription

Hi,

I'm working on a project trying to do a webDAV "update" subscription to
an MS Exchange calendar folder (so if anyone has a working example of
doing this with the Slide - webDAV client that would be very helpful!).

I've tried lots of different ways to instantiate a subscription but I'm
always getting back error code 400 (Bad Request).

Can anyone give me some advice?

Thanks!
-Zac Morris

________________________________

When I run the below I get an error code 400 in sub:

HttpURL url    = null;
String server_prot  = "http";
String server       = "exchange.foo.com";
String path         = server_prot+"://"+server+path;
if (server_prot.equals("https")){
url = new HttpsURL(path);
} else {
url = new HttpURL(path);
} 
url.setUserinfo((gen_domain!=null?gen_domain+"\\":"")+gen_userID,gen_pas
s); 
WebdavResource rc = new WebdavResource(url,true);
SubscribeMethod sub = new SubscribeMethod(path);
sub.setCallback("http://"+InetAddress.getLocalHost().getHostAddress()+"/
index.html");
sub.setNotificationDelay(1);
sub.setDepth(1);
sub.setNotificationType(Subscription.UPDATE_NOTIFICATION);
sub.setSubsciptionLifetime(300);
sub.setDebug(1);
rc.executeHttpRequestMethod(rc.getSessionInstance(url),sub);
Enumeration e = sub.getResponses();
while (e.hasMoreElements()){
System.out.println(e.nextElement());
}
 
 

Re: Question regarding webDAV client and Subscription

Posted by Marco Ferretti <ma...@gmail.com>.
On 8/26/06, Zac Morris (zmorris) <zm...@cisco.com> wrote:
>
>
>
> Hi,
>
> I'm working on a project trying to do a webDAV "update" subscription to an
> MS Exchange calendar folder (so if anyone has a working example of doing
> this with the Slide - webDAV client that would be very helpful!).
>
> I've tried lots of different ways to instantiate a subscription but I'm
> always getting back error code 400 (Bad Request).
>
> Can anyone give me some advice?
>
> Thanks!
> -Zac Morris
>
>  ________________________________
>
>
> When I run the below I get an error code 400 in sub:
> HttpURL url    = null;
> String server_prot  = "http";
> String server       = "exchange.foo.com";
> String path         = server_prot+"://"+server+path;
> if (server_prot.equals("https")){
> url = new HttpsURL(path);
> } else {
> url = new HttpURL(path);
> }
> url.setUserinfo((gen_domain!=null?gen_domain+"\\":"")+gen_userID,gen_pass);
> WebdavResource rc = new WebdavResource(url,true);
> SubscribeMethod sub = new SubscribeMethod(path);
> sub.setCallback("http://"+InetAddress.getLocalHost().getHostAddress()+"/index.html");
> sub.setNotificationDelay(1);
> sub.setDepth(1);
> sub.setNotificationType(Subscription.UPDATE_NOTIFICATION);
> sub.setSubsciptionLifetime(300);
> sub.setDebug(1);
> rc.executeHttpRequestMethod(rc.getSessionInstance(url),sub);
> Enumeration e = sub.getResponses();
> while (e.hasMoreElements()){
> System.out.println(e.nextElement());
> }
>
>

Hi Zac,

this should give you some hints :
http://support.microsoft.com/kb/q296126/

I know it's vb code, but it's quite readable and should tell you how
to use client's api to connect to exchange .


hope it helps


Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org