12 May 2009 19:15
not able to connect outlook load balancer url using WEBDAV
Narasimha bayanaboina <narsim10_mca <at> yahoo.com>
2009-05-12 17:15:59 GMT
2009-05-12 17:15:59 GMT
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 base64webdavurlconnection.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
RSS Feed