Narasimha bayanaboina | 12 May 19:15 2009
Picon

not able to connect outlook load balancer url using WEBDAV


 
Hi,
 
Iam trying to connect microsoft exchange server using WEBDAV . Iam able to connect backend server urls as well as front end urls . but Iam not able to connect Load balancer URLs and Iam getting 302 Redirection status code. i have written a class called ExchangeDAV4JURLConnection  that extends HttpURLConnection
 
my code looks like this .any help can be apreciated
 

webdavurlconnection =

new ExchangeDAV4JURLConnection(url, url.getHost(), i != -1 ? i : 80);

 

webdavurlconnection.setRequestProperty(

"Depth", "1");

webdavurlconnection.setRequestProperty(

"Host", url.getHost());

webdavurlconnection.setRequestProperty(

"Content-Type", "text/xml");

//encode credentials using base64

webdavurlconnection.setRequestProperty(

"Authorization", (new StringBuilder()).append("Basic ").append(Credentials.base64Encode(domain)).toString());

webdavurlconnection.setRequestMethod(

"SEARCH");

webdavurlconnection.setDoOutput(

true);

webdavurlconnection.setConnectTimeout(1000);

OutputStream outputstream = webdavurlconnection.getOutputStream();

BufferedWriter bufferedwriter =

new BufferedWriter(new OutputStreamWriter(outputstream, "UTF-8"));

bufferedwriter.write(query);

 

 

thanks,

narasim




Julian Reschke | 19 May 11:24 2009
Picon
Picon

Re: not able to connect outlook load balancer url using WEBDAV

Hi,

this has nothing to do with WebDAV versioning, so this is not the best 
mailing list to use.

But anyway: why don't you just follow the redirect?

BR, Julian

Narasimha bayanaboina wrote:
> 
> 
>  
> Hi,
>  
> Iam trying to connect microsoft exchange server using WEBDAV . Iam able 
> to connect backend server urls as well as front end urls . but Iam not 
> able to connect Load balancer URLs and Iam getting 302 Redirection 
> status code. i have written a class called *ExchangeDAV4JURLConnection* 
>  that extends *HttpURLConnection*
>  
> my code looks like this .any help can be apreciated
>  
> 
> webdavurlconnection = * new * ExchangeDAV4JURLConnection(url, 
> url.getHost(), i != -1 ? i : 80);
> 
>  
> 
> webdavurlconnection.setRequestProperty( "Depth" , "1" );
> 
> webdavurlconnection.setRequestProperty( "Host" , url.getHost());
> 
> webdavurlconnection.setRequestProperty( "Content-Type" , "text/xml" );
> 
> //encode credentials using base64
> 
> webdavurlconnection.setRequestProperty( "Authorization" , ( * new * 
> StringBuilder()).append( "Basic " 
> ).append(Credentials./base64Encode/(domain)).toString());
> 
> webdavurlconnection.setRequestMethod( "SEARCH" );
> 
> webdavurlconnection.setDoOutput( * true * );
> 
> webdavurlconnection.setConnectTimeout(1000);
> 
> OutputStream outputstream = webdavurlconnection.getOutputStream();
> 
> BufferedWriter bufferedwriter = * new * BufferedWriter( * new * 
> OutputStreamWriter(outputstream, "UTF-8" ));
> 
> bufferedwriter.write(query);
> 
>  
> 
>  
> 
> thanks,
> 
> narasim
> 
> 
> 
> 


Gmane