Re: java client and ntlm proxy

"Pierre Gilquin" <[email protected]> Tue, 15 Mar 2011 14:45:41 +0100
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============0009393603==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0018_01CBE31F.A8714D00"

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01CBE31F.A8714D00
Content-Type: text/plain;
	charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

I try what you said with httpclient, my code looks like :=20
        proxyclient.getHostConfiguration().setHost("www.yahoo.com");
        // set the proxy host and port
        proxyclient.getHostConfiguration().setProxy("vali.hcuge.ch", =
8080);
        // set the proxy credentials, only necessary for authenticating =
proxies =20
        proxyclient.getState().setProxyCredentials(
            AuthScope.ANY,
            new NTCredentials("pegn", "mypassword","localhost","huge"));

I used NTCredentials in order to use the domain of my login but now it =
is complaining with authentication :


15 mars 2011 12:33:48 =
org.apache.commons.httpclient.auth.AuthChallengeProcessor =
selectAuthScheme
INFO: ntlm authentication scheme selected
15 mars 2011 12:33:50 org.apache.commons.httpclient.HttpMethodDirector =
processProxyAuthChallenge
INFO: Failure authenticating with NTLM <any realm>@vali.hcuge.ch:8080
Connect failed: HTTP/1.1 407 Proxy Authentication Required

did I miss something ? it's seems it doenot use my credentials ...

Thanks

Pierre
  ----- Original Message -----=20
  From: Aur=E9lien Minet=20
  To: [email protected] ; [email protected]=20
  Sent: Tuesday, March 15, 2011 12:22 AM
  Subject: Re: java client and ntlm proxy





  On 03/14/2011 09:32 AM, Pierre Gilquin wrote:
  > Merci Aur=E9lien.

  De rien Pierre

  the methode createSocket in the class extending EOHTTPChanel have to =
return a socket
  I think Apache HttpClient would help to create one and handle proxy =
stuff
  see =
http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/branches/HTTPCLIE=
NT_3_0_BRANCH/src/examples/ProxyTunnelDemo.java

  after Socket socket =3D response.getSocket();
  you may have to add
  socket.setTcpNoDelay(true);
  socket.setSoTimeout(2147483647);

  I also found that in NSSocketUtilities the creation of the socket was =
done in a internal class SocketThread which=20
  extends Thread

  Aur=E9lien

  ps: cntlm would be necessary if an NTLM authentication is necessary , =
if not Java Client only have to connect to the=20
  proxy for accessing the application which behind it.


  > I have already try to extend EOHTTPChannel. Until now without =
success ...
  > It's why i try to use cntlm.
  >
  > My last attempt is to use cntlm tunneling :
  >>cntlm.exe -c cntlm.ini -v
  > cntlm: New tunnel from 127.0.0.1:11443 to host.domain.tld:80
  >
  >
  > In this case the launch don't use any http.proxy but directly the =
port 11443 on localhost:
  >>java MyClassUsingEOClientApplicationSupport -applicationURL =
http://localhost:11443/cgi-bin/WebObjects/MyAppli.woa
  >
  > I dont understand why this is not working ...
  >
  > Thanks for any idea
  >
  > Pierre
  >
  >     ----- Original Message -----
  >     From: Aur=E9lien Minet
  >     To: [email protected] =
<mailto:[email protected]> ; WebObjects (Group)
  >     Sent: Sunday, March 13, 2011 10:56 PM
  >     Subject: Re: java client and ntlm proxy
  >
  >
  >     Hi
  >
  >     Yes the socket is open directly, in fact stuff behind =
EOHTTPChannel (createSocket) doesn't take in account http.proxy*
  >     args cause finally use java.net.Socket and not java.net.URL, so =
Java Client can't connect to the application trough any
  >     HTTP proxy (NTML or not).
  >     A solution could be to override  =
NSSocketUtilities.getSocketWithTimeout or to extend
  >     com.webobjects.eodistribution.client.EOHTTPChannel with a class =
having a methode createSocket which return a Socket.
  >     We have got the same problem for Java Client connecting to the =
application using an https URL. A colleague make a POC
  >     with a class which extends EOHTTPChannel and use javax.net.ssl
  >
  >     Aurelien
  >
  >     ps : for command line launching
  >     java -classpath "jar list" =
com.webobjects.eoapplication.client.EOClientApplicationSupport
  >     -applicationURL =
http://host.domain.tld/cgi-bin/WebObjects/App.woa [other arguments]
  >     (prefer a .jnlp file for deployment)
  >
  >
  >     On 03/08/2011 09:43 AM, Pierre Gilquin wrote:
  >     > Hi David,
  >     >
  >     > Starting the application with JWS or at command line gives the =
same result.
  >     > I guess that the socket is open directly (port 80) without =
going thru the proxy and that's why I get a timeout error.
  >     >
  >     > I dont get your idea, what can you check in the jnlp file ?
  >     > Thanks
  >     >
  >     > Pierre
  >     >
  >     >
  >     >
  >     >     ----- Original Message -----
  >     >     *From:* David Avendasora =
<mailto:[email protected]>
  >     >     *To:* Pierre Gilquin <mailto:[email protected]>
  >     >     *Cc:* [email protected] =
<mailto:[email protected]>
  >     <mailto:[email protected]>
  >     >     *Sent:* Monday, March 07, 2011 8:26 PM
  >     >     *Subject:* Re: java client and ntlm proxy
  >     >
  >     >     Hi Pierre,
  >     >
  >     >     Are you launching the application from a link that =
downloads a .jnlp file from the server? If so, look at it's
  >     >     contents to be sure it is using the ports you think it is.
  >     >
  >     >     Dave
  >     >
  >     >
  >     >     On Mar 7, 2011, at 11:52 AM, Pierre Gilquin wrote:
  >     >
  >     >>     Hi all,
  >     >>
  >     >>     I am trying to use a java client inside a entreprise =
network using an ntml proxy with authentification for
  >     >>     accessing the outside world.
  >     >>
  >     >>     Seems that java cannot pass that kind of  proxy. At =
least, I was not able to do it.
  >     >>     So I try to use cntlm  http://cntlm.sourceforge.net/  =
<x-msg://292/> before starting the java client :
  >     >>
  >     >>     >cntlm.exe -c cntlm.ini -v
  >     >>     cntlm: Proxy listening on 127.0.0.1:3128
  >     >>     cntlm: Resolving proxy TheBorringProxy ...
  >     >>     cntlm: Workstation name used: localhost
  >     >>     cntlm: Using following NTLM hashes: NTLMv2(1) NT(0) LM(0)
  >     >>     cntlm: PID 980: Cntlm ready, staying in the foreground
  >     >>
  >     >>     Then I start my java client  :
  >     >>     java -Dhttp.proxySet=3Dtrue -Dhttp.proxyHost=3D127.0.0.1 =
-Dhttp.proxyPort=3D3128 MyClass
  >     >>     -applicationURL =
http://www.externaldomain.com/cgi-bin/WebObjects/MyAppli.woa =
<x-msg://292/>
  >     >>
  >     >>     But not better, the java client cannot create the socket =
:
  >     >>     com.webobjects.foundation.NSForwardException for =
java.io.IOException: Timed out trying to create Socket
  >     >>      at =
com.webobjects.foundation.NSSocketUtilities._getSocketWithTimeout(NSSocke=
tUtilities.java:145)
  >     >>      at =
com.webobjects.foundation.NSSocketUtilities.getSocketWithTimeout(NSSocket=
Utilities.java:100)
  >     >>      at =
com.webobjects.foundation.NSSocketUtilities.getSocketWithTimeout(NSSocket=
Utilities.java:58)
  >     >>      at =
com.webobjects.eodistribution.client.EOHTTPChannel.createSocket(EOHTTPCha=
nnel.java:401)
  >     >>
  >     >>     Am I missing something ? May be I am wrong about the way =
i start my java client ?
  >     >>
  >     >>     Thanks for any idea.
  >     >>
  >     >>     Pierre
  >     >
  >     >
  >     >
  >     >  _______________________________________________
  >     > Do not post admin requests to the list. They will be ignored.
  >     > Webobjects-dev mailing list      =
([email protected] <mailto:[email protected]>)
  >     > Help/Unsubscribe/Update your Subscription:
  >     > =
http://lists.apple.com/mailman/options/webobjects-dev/aurelien.minet%40un=
iv-provence.fr
  >     >
  >     > This email sent to [email protected] =
<mailto:[email protected]>
  >
  >     _______________________________________________
  >     WebObjects-dev mailing list
  >     [email protected] =
<mailto:[email protected]>
  >     http://www.omnigroup.com/mailman/listinfo/webobjects-dev
  >
  >
  >
  >  _______________________________________________
  > Do not post admin requests to the list. They will be ignored.
  > Webobjects-dev mailing list      ([email protected])
  > Help/Unsubscribe/Update your Subscription:
  > =
http://lists.apple.com/mailman/options/webobjects-dev/aurelien.minet%40un=
iv-provence.fr
  >
  > This email sent to [email protected]

  _______________________________________________
  WebObjects-dev mailing list
  [email protected]
  http://www.omnigroup.com/mailman/listinfo/webobjects-dev
------=_NextPart_000_0018_01CBE31F.A8714D00
Content-Type: text/html;
	charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.6000.16915" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>I try what you said with httpclient, =
m</FONT>y code=20
looks like : </DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
proxyclient.getHostConfiguration().setHost("<A=20
href=3D"http://www.yahoo.com/">www.yahoo.com</A>");<BR>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
// set the proxy host and =
port<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
proxyclient.getHostConfiguration().setProxy("vali.hcuge.ch",=20
8080);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // set the proxy=20
credentials, only necessary for authenticating=20
proxies&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
proxyclient.getState().setProxyCredentials(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
AuthScope.ANY,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
new NTCredentials("pegn", =
"mypassword","localhost","huge"));</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I used NTCredentials in order to use =
the domain of=20
my login but now it is complaining with authentication :</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>15 mars 2011 12:33:48=20
org.apache.commons.httpclient.auth.AuthChallengeProcessor=20
selectAuthScheme<BR>INFO: ntlm authentication scheme selected<BR>15 mars =
2011=20
12:33:50 org.apache.commons.httpclient.HttpMethodDirector=20
processProxyAuthChallenge<BR>INFO: Failure authenticating with NTLM =
&lt;any=20
realm&gt;@vali.hcuge.ch:8080<BR>Connect failed: HTTP/1.1 407 Proxy=20
Authentication Required</FONT></DIV><FONT face=3DArial =
size=3D2></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>did I miss =
something ? it's=20
seems it doenot use my credentials ...</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Thanks</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial=20
size=3D2>Pierre</DIV></FONT></FONT></FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A [email protected]=20
  href=3D"mailto:[email protected]">Aur=E9lien Minet</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  [email protected]=20
  =
href=3D"mailto:[email protected]">[email protected]=
.com</A>=20
  ; <A [email protected]=20
  =
href=3D"mailto:[email protected]">[email protected]=
</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, March 15, 2011 =
12:22=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: java client and =
ntlm=20
  proxy</DIV>
  <DIV><BR></DIV><BR><BR><BR>On 03/14/2011 09:32 AM, Pierre Gilquin=20
  wrote:<BR>&gt; Merci Aur=E9lien.<BR><BR>De rien Pierre<BR><BR>the =
methode=20
  createSocket in the class extending EOHTTPChanel have to return a =
socket<BR>I=20
  think Apache HttpClient would help to create one and handle proxy =
stuff<BR>see=20
  <A=20
  =
href=3D"http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/branches/=
HTTPCLIENT_3_0_BRANCH/src/examples/ProxyTunnelDemo.java">http://svn.apach=
e.org/repos/asf/httpcomponents/oac.hc3x/branches/HTTPCLIENT_3_0_BRANCH/sr=
c/examples/ProxyTunnelDemo.java</A><BR><BR>after=20
  Socket socket =3D response.getSocket();<BR>you may have to=20
  =
add<BR>socket.setTcpNoDelay(true);<BR>socket.setSoTimeout(2147483647);<BR=
><BR>I=20
  also found that in NSSocketUtilities the creation of the socket was =
done in a=20
  internal class SocketThread which <BR>extends=20
  Thread<BR><BR>Aur=E9lien<BR><BR>ps: cntlm would be necessary if an =
NTLM=20
  authentication is necessary , if not Java Client only have to connect =
to the=20
  <BR>proxy for accessing the application which behind =
it.<BR><BR><BR>&gt; I=20
  have already try to extend EOHTTPChannel. Until now without success=20
  ...<BR>&gt; It's why i try to use cntlm.<BR>&gt;<BR>&gt; My last =
attempt is to=20
  use cntlm tunneling :<BR>&gt;&gt;cntlm.exe -c cntlm.ini -v<BR>&gt; =
cntlm: New=20
  tunnel from 127.0.0.1:11443 to =
host.domain.tld:80<BR>&gt;<BR>&gt;<BR>&gt; In=20
  this case the launch don't use any http.proxy but directly the port =
11443 on=20
  localhost:<BR>&gt;&gt;java MyClassUsingEOClientApplicationSupport=20
  -applicationURL <A=20
  =
href=3D"http://localhost:11443/cgi-bin/WebObjects/MyAppli.woa">http://loc=
alhost:11443/cgi-bin/WebObjects/MyAppli.woa</A><BR>&gt;<BR>&gt;=20
  I dont understand why this is not working ...<BR>&gt;<BR>&gt; Thanks =
for any=20
  idea<BR>&gt;<BR>&gt; Pierre<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
-----=20
  Original Message -----<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; From: =
Aur=E9lien=20
  Minet<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; To: <A=20
  =
href=3D"mailto:[email protected]">[email protected]=
</A>=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:webobjects-dev@omnigr=
oup.com</A>&gt;=20
  ; WebObjects (Group)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Sent: Sunday, =
March 13,=20
  2011 10:56 PM<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Subject: Re: java client =
and=20
  ntlm proxy<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Hi<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Yes the socket is open =
directly, in=20
  fact stuff behind EOHTTPChannel (createSocket) doesn't take in account =

  http.proxy*<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; args cause finally use=20
  java.net.Socket and not java.net.URL, so Java Client can't connect to =
the=20
  application trough any<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; HTTP proxy =
(NTML or=20
  not).<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; A solution could be to =
override&nbsp;=20
  NSSocketUtilities.getSocketWithTimeout or to=20
  extend<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  com.webobjects.eodistribution.client.EOHTTPChannel with a class having =
a=20
  methode createSocket which return a =
Socket.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; We=20
  have got the same problem for Java Client connecting to the =
application using=20
  an https URL. A colleague make a POC<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
with a=20
  class which extends EOHTTPChannel and use=20
  javax.net.ssl<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Aurelien<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ps : for command line =

  launching<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; java -classpath "jar list"=20
  =
com.webobjects.eoapplication.client.EOClientApplicationSupport<BR>&gt;&nb=
sp;&nbsp;&nbsp;&nbsp;=20
  -applicationURL <A=20
  =
href=3D"http://host.domain.tld/cgi-bin/WebObjects/App.woa">http://host.do=
main.tld/cgi-bin/WebObjects/App.woa</A>=20
  [other arguments]<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (prefer a .jnlp file =
for=20
  deployment)<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; On =
03/08/2011=20
  09:43 AM, Pierre Gilquin wrote:<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; =
Hi=20
  David,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt; Starting the application with JWS or at command line gives the =
same=20
  result.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I guess that the socket =
is open=20
  directly (port 80) without going thru the proxy and that's why I get a =
timeout=20
  error.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt; I dont get your idea, what can you check in the jnlp file=20
  ?<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; =
Thanks<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;=20
  Pierre<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&nbsp;&nbsp;&nbsp;&nbsp; ----- Original Message=20
  -----<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; =
*From:*=20
  David Avendasora &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:[email protected]=
m</A>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&nbsp;&nbsp;&nbsp;&nbsp; *To:* Pierre Gilquin &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:[email protected]</A>&gt;<BR=
>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&nbsp;&nbsp;&nbsp;&nbsp; *Cc:* <A=20
  =
href=3D"mailto:[email protected]">[email protected]=
.com</A>=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:webobjects-dev@list=
s.apple.com</A>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:webobjects-dev@list=
s.apple.com</A>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&nbsp;&nbsp;&nbsp;&nbsp; *Sent:* Monday, March 07, 2011 8:26=20
  PM<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; =
*Subject:* Re:=20
  java client and ntlm proxy<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Hi=20
  Pierre,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&nbsp;&nbsp;&nbsp;&nbsp; Are you launching the application from a =
link=20
  that downloads a .jnlp file from the server? If so, look at=20
  it's<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; =
contents to=20
  be sure it is using the ports you think it =
is.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Dave<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; On =
Mar 7,=20
  2011, at 11:52 AM, Pierre Gilquin =
wrote:<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
Hi=20
  all,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I am trying to use a java client =
inside a=20
  entreprise network using an ntml proxy with authentification=20
  for<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
accessing=20
  the outside world.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  Seems that java cannot pass that kind of&nbsp; proxy. At least, I was =
not able=20
  to do it.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; So=20
  I try to use cntlm&nbsp; <A=20
  =
href=3D"http://cntlm.sourceforge.net/">http://cntlm.sourceforge.net/</A>&=
nbsp;=20
  &lt;x-msg://292/&gt; before starting the java client=20
  :<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;cntlm.exe -c cntlm.ini=20
  -v<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
cntlm:=20
  Proxy listening on 127.0.0.1:3128<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cntlm: Resolving proxy =
TheBorringProxy=20
  ...<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
cntlm:=20
  Workstation name used: localhost<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cntlm: Using following NTLM hashes: =
NTLMv2(1)=20
  NT(0) LM(0)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  cntlm: PID 980: Cntlm ready, staying in the=20
  foreground<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Then=20
  I start my java client&nbsp; :<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; java -Dhttp.proxySet=3Dtrue=20
  -Dhttp.proxyHost=3D127.0.0.1 -Dhttp.proxyPort=3D3128=20
  MyClass<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  -applicationURL <A=20
  =
href=3D"http://www.externaldomain.com/cgi-bin/WebObjects/MyAppli.woa">htt=
p://www.externaldomain.com/cgi-bin/WebObjects/MyAppli.woa</A>=20
  &lt;x-msg://292/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; But=20
  not better, the java client cannot create the socket=20
  :<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  com.webobjects.foundation.NSForwardException for java.io.IOException: =
Timed=20
  out trying to create Socket<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at=20
  =
com.webobjects.foundation.NSSocketUtilities._getSocketWithTimeout(NSSocke=
tUtilities.java:145)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at=20
  =
com.webobjects.foundation.NSSocketUtilities.getSocketWithTimeout(NSSocket=
Utilities.java:100)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at=20
  =
com.webobjects.foundation.NSSocketUtilities.getSocketWithTimeout(NSSocket=
Utilities.java:58)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at=20
  =
com.webobjects.eodistribution.client.EOHTTPChannel.createSocket(EOHTTPCha=
nnel.java:401)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Am I=20
  missing something ? May be I am wrong about the way i start my java =
client=20
  ?<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for any=20
  idea.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
Pierre<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =
&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;=20
  =
_______________________________________________<BR>&gt;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
  &gt; Do not post admin requests to the list. They will be=20
  ignored.<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Webobjects-dev mailing=20
  list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<A=20
  =
href=3D"mailto:[email protected]">[email protected]=
.com</A>=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:Webobjects-dev@list=
s.apple.com</A>&gt;)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  &gt; Help/Unsubscribe/Update your=20
  Subscription:<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; <A=20
  =
href=3D"http://lists.apple.com/mailman/options/webobjects-dev/aurelien.mi=
net%40univ-provence.fr">http://lists.apple.com/mailman/options/webobjects=
-dev/aurelien.minet%40univ-provence.fr</A><BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
  &gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; This email sent to <A=20
  =
href=3D"mailto:[email protected]">aurelien.minet@univ-prove=
nce.fr</A>=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:aurelien.minet@uni=
v-provence.fr</A>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  =
_______________________________________________<BR>&gt;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
  WebObjects-dev mailing list<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <A=20
  =
href=3D"mailto:[email protected]">[email protected]=
</A>=20
  &lt;<A=20
  =
href=3D"mailto:[email protected]">mailto:WebObjects-dev@omnigr=
oup.com</A>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
  <A=20
  =
href=3D"http://www.omnigroup.com/mailman/listinfo/webobjects-dev">http://=
www.omnigroup.com/mailman/listinfo/webobjects-dev</A><BR>&gt;<BR>&gt;<BR>=
&gt;<BR>&gt;&nbsp;=20
  _______________________________________________<BR>&gt; Do not post =
admin=20
  requests to the list. They will be ignored.<BR>&gt; Webobjects-dev =
mailing=20
  list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<A=20
  =
href=3D"mailto:[email protected]">[email protected]=
.com</A>)<BR>&gt;=20
  Help/Unsubscribe/Update your Subscription:<BR>&gt; <A=20
  =
href=3D"http://lists.apple.com/mailman/options/webobjects-dev/aurelien.mi=
net%40univ-provence.fr">http://lists.apple.com/mailman/options/webobjects=
-dev/aurelien.minet%40univ-provence.fr</A><BR>&gt;<BR>&gt;=20
  This email sent to <A=20
  =
href=3D"mailto:[email protected]">aurelien.minet@univ-prove=
nce.fr</A><BR><BR>_______________________________________________<BR>WebO=
bjects-dev=20
  mailing list<BR><A=20
  =
href=3D"mailto:[email protected]">[email protected]=
</A><BR><A=20
  =
href=3D"http://www.omnigroup.com/mailman/listinfo/webobjects-dev">http://=
www.omnigroup.com/mailman/listinfo/webobjects-dev</A></BLOCKQUOTE></BODY>=
</HTML>

------=_NextPart_000_0018_01CBE31F.A8714D00--


--===============0009393603==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev

--===============0009393603==--