Strange, I´m using j2sdk1.4.1_01. As long as I know, this version has built-in JCE support. I think I can´t answer the other questions... I´m using plain httpclient, the way I downloaded it. No changes.
Thanks! Andre -----Mensagem original----- De: Adrian Sutton [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 21 de julho de 2003 19:52 Para: Commons HttpClient Project Assunto: Re: NTLM Error 2003-07-21 18:41:45,814 [main] WARN org.apache.commons.httpclient.HttpMethodBase - DES encryption is not available. Thar's ya problem laddie... :) You need to install JCE to make NTLM authentication work. More info at http://jakarta.apache.org/commons/httpclient/authentication.html My two questions are: 1. Why is this warning coming from HttpMethodBase and 2. why isn't it fatal or at least ERROR? I believe HttpMethodBase is catching the exception thrown by the NTLM auth module and it really should be reporting it as an error instead of a warning or better yet throwing an exception out (as I believe it would do with the latest exception handling refactoring). Hope that helps, Adrian Sutton. On Tuesday, July 22, 2003, at 07:50 AM, Andre Augusto de Oliveira Aragao wrote: > Ops, I didn´t change the subject... Sorry. > > -----Mensagem original----- > De: Andre Augusto de Oliveira Aragao > Enviada em: segunda-feira, 21 de julho de 2003 18:49 > Para: 'Commons HttpClient Project' > Assunto: RES: DO NOT REPLY [Bug 21754] - NullPointerException when rel > easing connection > > > Hi! > > I am trying to use NTLM authentication, but it´s not working. It seems > httpclient stops in the middle of the negotiation. > > I´m attaching the logs, just in case. > > Thanks in advance, > > PS: I´m using the latest nightly snapshot (20030721), and I´ve tried to > authenticate against two servers: IIS 5.0 and Jetty (using jcifs.org > ntlm > filter). > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ---------------------------------------------- Intencha "tomorrow's technology today" Ph: 38478913 0422236329 Suite 8/29 Oatland Crescent Holland Park West 4121 Australia QLD www.intencha.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
(...) HttpClient client = new HttpClient(); client.setConnectionTimeout(60000); client.setTimeout(60000); client.getState().setCredentials(null, null, new NTCredentials("user", "pass", "host", "NTDOMAIN")); client.getState().setAuthenticationPreemptive(true); PostMethod method = null; NameValuePair[] cgiParametros = new NameValuePair[3]; cgiParametros[0] = new NameValuePair("coddd", "62"); cgiParametros[1] = new NameValuePair("nucelr", "96798008"); cgiParametros[2] = new NameValuePair("ds_msg", "HI"); method = new PostMethod("http://tconet/app/ecel.asp"); method.setDoAuthentication(true); method.setRequestBody(cgiParams); method.setRequestHeader("Content-type", PostMethod.FORM_URL_ENCODED_CONTENT_TYPE); // Execute the method. int statusCode = -1; int attempt = 0; // We will retry up to 3 times. while (statusCode == -1 && attempt < 3) { try { // execute the method. statusCode = client.executeMethod(method); } catch (HttpRecoverableException e) {} catch (IOException e) { System.out.println(e); method.recycle(); } } String responseBody = method.getResponseBodyAsString(); method.releaseConnection(); }catch(Exception e){ System.out.println("Error "+e.getMessage()); e.printStackTrace(); } (..)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]