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 Azam Jalali <ja...@yahoo.com> on 2006/01/02 13:48:37 UTC
slide-user@jakarta.apache.org
Dear Ekan,
I appreciate your guide.
Would you please send your code sample.
Thanks in advance
Azam Jalali
Hi Azam,
Usually FBA (Form based authentication) is turned on on the exchange server. When you try
to access the exchange server using slide, you will get a 401 error as you have not supplied
the credentials. The way to avoid this is to first supply the credentials and login using
FBA programmatically, get the session cookies and send the cookies everytime with your webdav
request.
I have done this and it works. Let me know and I can send you the code sample.
The other option is to do this using javascript (AJAX). The advantage is that the browser
will take care of sending the credentials (assuming you are executing the code from a browser
in a machine which is logged on to your network).
Hope this helps
Thanks
Ekan
________________________________
From: Azam Jalali [mailto:jalali_azam@yahoo.com]
Sent: Sun 12/25/2005 1:30 AM
To: slide-user@jakarta.apache.org
Subject: Unauthorized (401) exception (SCL: 6)
I want to connect to a microsoft exchange server 2003 to call mkcolMethod and etc.
I used the following code :
HttpURL hrl = new HttpURL("http://" + MailBoxManager.getDirectoryServer() + "/exchange/man/");
NTCredentials ntc = new NTCredentials("man", "password", "opxiAppServer.cc.basamad.acc",
"CC");
WebdavResource wdr = new WebdavResource(hrl, ntc, WebdavResource.ALL, DepthSupport.DEPTH_1);
boolean done=false;
done = wdr.mkcolMethod("/exchange/temp/opxi");//.list();
if (!done) {
String msg = wdr.getStatusMessage();
System.out.println("mesg = " + msg);
}
After running this code i got this exception
mesg= Unauthorized (401) is occured.
Before trying with the above code snippet, I tried to access my Exchange server through
Outlook Web Access (OWA) from my browser. for the next time, when I tried to connect to the
Exchange server using my code snippet, Every thing was ok.Mkcol Method is done successfully
without exception. I need to solve it in my code without opening mailbox from browser at first
time.
Is this possible with Jakarta Slide ?
Best Regards
Azam Jalali
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------
Yahoo! for Good - Make a difference this year.
Re: slide-user jakarta.apache.org
Posted by Anurag Garg <an...@bt.com>.
Hi,
Can anybody please help me in writing a code which doesn't show up the
authentication dialog box for OWA...
Iam trying to show OWA on my browser using httpclient but everytime it shows
up the logon screen
Thanks
Anurag Garg
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
401 exception
Posted by Azam Jalali <ja...@yahoo.com>.
My problem was Authentication protocol. I had used NTlM 1 authentication instead of NTLM 2 authentication.
See http://jcifs.samba.org/ for more information.
Regards
Azam Jalali
Azam Jalali <ja...@yahoo.com> wrote: Dear Ekan,
I appreciate your guide.
Would you please send your code sample.
Thanks in advance
Azam Jalali
Hi Azam,
Usually FBA (Form based authentication) is turned on on the exchange server. When you try
to access the exchange server using slide, you will get a 401 error as you have not supplied
the credentials. The way to avoid this is to first supply the credentials and login using
FBA programmatically, get the session cookies and send the cookies everytime with your webdav
request.
I have done this and it works. Let me know and I can send you the code sample.
The other option is to do this using javascript (AJAX). The advantage is that the browser
will take care of sending the credentials (assuming you are executing the code from a browser
in a machine which is logged on to your network).
Hope this helps
Thanks
Ekan
________________________________
From: Azam Jalali [mailto:jalali_azam@yahoo.com]
Sent: Sun 12/25/2005 1:30 AM
To: slide-user@jakarta.apache.org
Subject: Unauthorized (401) exception (SCL: 6)
I want to connect to a microsoft exchange server 2003 to call mkcolMethod and etc.
I used the following code :
HttpURL hrl = new HttpURL("http://" + MailBoxManager.getDirectoryServer() + "/exchange/man/");
NTCredentials ntc = new NTCredentials("man", "password", "opxiAppServer.cc.basamad.acc",
"CC");
WebdavResource wdr = new WebdavResource(hrl, ntc, WebdavResource.ALL, DepthSupport.DEPTH_1);
boolean done=false;
done = wdr.mkcolMethod("/exchange/temp/opxi");//.list();
if (!done) {
String msg = wdr.getStatusMessage();
System.out.println("mesg = " + msg);
}
After running this code i got this exception
mesg= Unauthorized (401) is occured.
Before trying with the above code snippet, I tried to access my Exchange server through
Outlook Web Access (OWA) from my browser. for the next time, when I tried to connect to the
Exchange server using my code snippet, Every thing was ok.Mkcol Method is done successfully
without exception. I need to solve it in my code without opening mailbox from browser at first
time.
Is this possible with Jakarta Slide ?
Best Regards
Azam Jalali
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------
Yahoo! for Good - Make a difference this year.
---------------------------------
Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.