hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Anecito <adanec...@yahoo.com>
Subject Re: Almost there just need a little more help...
Date Wed, 02 Jan 2013 02:15:23 GMT
Problem solved. It turned out I needed to supply proxy name and port.
 
Regards,
-Tony

--- On Tue, 1/1/13, Tony Anecito <adanecito@yahoo.com> wrote:


From: Tony Anecito <adanecito@yahoo.com>
Subject: Re: Almost there just need a little more help...
To: "HttpClient User Discussion" <httpclient-users@hc.apache.org>
Date: Tuesday, January 1, 2013, 1:18 AM


Ok maybe this is not about NTLM but instead finding the proxy. I get these connot connect
then retry verbage when running from within a company. So maybe it can not find the proxy?
I tried some solutions but none worked so far because I am using HttpClient(cm) in order to
use the multithreaded connection manager but the examples I have found seem to want only DefaultHttpClient.
 
Any suggestions?
 
Thks,
Tony

--- On Mon, 12/31/12, Tony Anecito <adanecito@yahoo.com> wrote:


From: Tony Anecito <adanecito@yahoo.com>
Subject: Re: Almost there just need a little more help...
To: "HttpClient User Discussion" <httpclient-users@hc.apache.org>
Date: Monday, December 31, 2012, 9:17 PM


Ok I found his example that might almost do what I need but I want the user id and password
coming from a popup dialog like the one I have seen coming from Metro (JAX-WS).
 
   client.getParams().setAuthenticationPreemptive(true);
    client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user.getUsername(),
user.getPassword()));

I will keep looking.
-Tony

--- On Mon, 12/31/12, Tony Anecito <adanecito@yahoo.com> wrote:


From: Tony Anecito <adanecito@yahoo.com>
Subject: Re: Almost there just need a little more help...
To: "HttpClient User Discussion" <httpclient-users@hc.apache.org>
Date: Monday, December 31, 2012, 8:58 PM


I did find an example called  ClientAuthentication but it looks like it assumes you always
have to authenticate but I only want to do that if needed. So if in a coffee shop where NTLM
is not needed for example I do not want to do that but if in a location where NTLM is needed
I do want to do the call httpclient.getCredentialsProvider().setCredentials().
 
Thanks for the advice.
-Tony


--- On Mon, 12/31/12, Tony Anecito <adanecito@yahoo.com> wrote:


From: Tony Anecito <adanecito@yahoo.com>
Subject: Almost there just need a little more help...
To: httpclient-users@hc.apache.org
Date: Monday, December 31, 2012, 8:47 PM


Hi All,
 
I am currently using JAX-WS and have been working on using JAX-RS using Jersey and Apache
Http Client. I have gotten requests to work between between my client and jax-rs service.
When I tried in an environment where NTLM is used I could not get my http requests to go through
the network. Now I remember having to work through this with JAX-WS but I am not sure what
to get http client to work using NTLM. What I want to have happen is the first time I try
to connect using apache http client I want a dialog to show asking for login/password and
after that is done be able to create requests that go all the way through to my remote server
running my web services.
 
So how can I do that? Is there an example somewhere on how to make it work that way without
a lot of coding?
 
Thanks for the help.
-Tony
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message