not able to connect outlook load balancer url using WEBDAV

Narasimha bayanaboina <[email protected]> Tue, 12 May 2009 10:15:59 -0700 (PDT)
Newsgroups gmane.ietf.deltav
Message-ID <[email protected]>
--0-1666333119-1242148559=:34190
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

=0A=A0=0AHi,=0A=0AIam trying to connect microsoft exchange server using WEB=
DAV . Iam able to connect backend server urls as well as front end urls . b=
ut Iam not able to connect Load balancer URLs and Iam getting 302 Redirecti=
on status code. i have written a class called ExchangeDAV4JURLConnection =
=A0that extends HttpURLConnection=0A=0Amy code looks like this .any help ca=
n be apreciated =0A=0Awebdavurlconnection =3D newExchangeDAV4JURLConnection=
(url, url.getHost(), i !=3D -1 ? i : 80);=A0webdavurlconnection.setRequestP=
roperty(=0Awebdavurlconnection.setRequestProperty(=0Awebdavurlconnection.se=
tRequestProperty("Depth", "1");"Host", url.getHost());"Content-Type", "text=
/xml");//encode credentials using base64webdavurlconnection.setRequestPrope=
rty(=0Awebdavurlconnection.setRequestMethod(=0Awebdavurlconnection.setDoOut=
put(=0Awebdavurlconnection.setConnectTimeout(1000);=0AOutputStream outputst=
ream =3D webdavurlconnection.getOutputStream();=0ABufferedWriter bufferedwr=
iter =3D =0Abufferedwriter.write(query);=0A=A0=0A=A0=0Athanks,=0Anarasim"Au=
thorization", (newStringBuilder()).append("Basic ").append(Credentials.base=
64Encode(domain)).toString());"SEARCH");true);newBufferedWriter(newOutputSt=
reamWriter(outputstream, "UTF-8"));=0A=0A=0A      
--0-1666333119-1242148559=:34190
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:arial, helvetica, sans-serif;font-size:1=
0pt"><DIV><BR>&nbsp;</DIV>=0A<DIV style=3D"FONT-SIZE: 10pt; FONT-FAMILY: ar=
ial, helvetica, sans-serif">=0A<DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: =
times new roman, new york, times, serif">=0A<DIV style=3D"FONT-SIZE: 10pt; =
FONT-FAMILY: arial, helvetica, sans-serif">=0A<DIV style=3D"FONT-SIZE: 10pt=
; FONT-FAMILY: arial, helvetica, sans-serif">=0A<DIV style=3D"FONT-SIZE: 12=
pt; FONT-FAMILY: times new roman, new york, times, serif">=0A<DIV style=3D"=
FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">=0A<DIV>Hi,</DI=
V>=0A<DIV>&nbsp;</DIV>=0A<DIV>Iam trying to connect microsoft exchange serv=
er 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 3=
02 Redirection status code. i have written a class called <STRONG>ExchangeD=
AV4JURLConnection</STRONG> &nbsp;that extends <FONT size=3D2><STRONG>HttpUR=
LConnection</STRONG></FONT></DIV>=0A<DIV>&nbsp;</DIV>=0A<DIV>my code looks =
like this .any help can be apreciated </DIV>=0A<DIV>&nbsp;</DIV>=0A<DIV><FO=
NT size=3D2>=0A<P align=3Dleft>webdavurlconnection =3D </FONT><B><FONT colo=
r=3D#7f0055 size=3D2><FONT color=3D#7f0055 size=3D2>new</B></FONT></FONT><F=
ONT size=3D2> ExchangeDAV4JURLConnection(url, url.getHost(), i !=3D -1 ? i =
: 80);</P>=0A<P align=3Dleft></FONT><FONT color=3D#3f7f5f size=3D2><FONT co=
lor=3D#3f7f5f size=3D2>&nbsp;</P></FONT></FONT><FONT size=3D2>=0A<P align=
=3Dleft>webdavurlconnection.setRequestProperty(</FONT><FONT color=3D#2a00ff=
 size=3D2><FONT color=3D#2a00ff size=3D2>"Depth"</FONT></FONT><FONT size=3D=
2>, </FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a00ff size=3D2>"1=
"</FONT></FONT><FONT size=3D2>);</P>=0A<P align=3Dleft>webdavurlconnection.=
setRequestProperty(</FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a0=
0ff size=3D2>"Host"</FONT></FONT><FONT size=3D2>, url.getHost());</P>=0A<P =
align=3Dleft>webdavurlconnection.setRequestProperty(</FONT><FONT color=3D#2=
a00ff size=3D2><FONT color=3D#2a00ff size=3D2>"Content-Type"</FONT></FONT><=
FONT size=3D2>, </FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a00ff=
 size=3D2>"text/xml"</FONT></FONT><FONT size=3D2>);</P>=0A<P align=3Dleft><=
/FONT><FONT color=3D#3f7f5f size=3D2><FONT color=3D#3f7f5f size=3D2>//encod=
e <U>credentials</U> using base64</P></FONT></FONT><FONT size=3D2>=0A<P ali=
gn=3Dleft>webdavurlconnection.setRequestProperty(</FONT><FONT color=3D#2a00=
ff size=3D2><FONT color=3D#2a00ff size=3D2>"Authorization"</FONT></FONT><FO=
NT size=3D2>, (</FONT><B><FONT color=3D#7f0055 size=3D2><FONT color=3D#7f00=
55 size=3D2>new</B></FONT></FONT><FONT size=3D2> StringBuilder()).append(</=
FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a00ff size=3D2>"Basic "=
</FONT></FONT><FONT size=3D2>).append(Credentials.<I>base64Encode</I>(domai=
n)).toString());</P>=0A<P align=3Dleft>webdavurlconnection.setRequestMethod=
(</FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a00ff size=3D2>"SEAR=
CH"</FONT></FONT><FONT size=3D2>);</P>=0A<P align=3Dleft>webdavurlconnectio=
n.setDoOutput(</FONT><B><FONT color=3D#7f0055 size=3D2><FONT color=3D#7f005=
5 size=3D2>true</B></FONT></FONT><FONT size=3D2>);</P>=0A<P align=3Dleft>we=
bdavurlconnection.setConnectTimeout(1000);</P>=0A<P align=3Dleft>OutputStre=
am outputstream =3D webdavurlconnection.getOutputStream();</P>=0A<P align=
=3Dleft>BufferedWriter bufferedwriter =3D </FONT><B><FONT color=3D#7f0055 s=
ize=3D2><FONT color=3D#7f0055 size=3D2>new</B></FONT></FONT><FONT size=3D2>=
 BufferedWriter(</FONT><B><FONT color=3D#7f0055 size=3D2><FONT color=3D#7f0=
055 size=3D2>new</B></FONT></FONT><FONT size=3D2> OutputStreamWriter(output=
stream, </FONT><FONT color=3D#2a00ff size=3D2><FONT color=3D#2a00ff size=3D=
2>"UTF-8"</FONT></FONT><FONT size=3D2>));</P>=0A<P align=3Dleft></P>=0A<P>b=
ufferedwriter.write(query);</P>=0A<P>&nbsp;</P>=0A<P>&nbsp;</P>=0A<P>thanks=
,</P>=0A<P>narasim</P></FONT></DIV></DIV><BR></DIV></DIV></DIV><BR></DIV></=
DIV></div><br>=0A=0A      </body></html>
--0-1666333119-1242148559=:34190--