commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashraf Fouad" <ashraf_fo...@rayasoftware.com>
Subject RE: httpclient: Behined ISA proxy server and need to reachInternet site
Date Tue, 31 Aug 2004 14:15:10 GMT
It worked fine after including the JCE and I changed the JDK to 1.4.2
thanks very much for yr help :))))))))

Thanks, Best regards

Ashraf Fouad Ayoub 
Senior software developer 
Raya Software 
1 Abdel Hameed Lotfy St., 
Nasr City, Cairo 11371, Egypt 
Phone: * (202) 670-3301/2/3/4/6/8 Ext. 295 
Fax:** (202) 670-3296 
Email: * ashraf_fouad@rayasoftware.com 
Web: * <http://www.rayasoftware.com/>

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@bluewin.ch] 
Sent: Tuesday, August 31, 2004 1:55 PM
To: Jakarta Commons Users List
Subject: RE: httpclient: Behined ISA proxy server and need to
reachInternet site

Ashraf,
Please make sure you have installed and properly configured the JCE
(Java Cryptography Extension). For details please refer to the
HttpClient authentication guide:

http://jakarta.apache.org/commons/httpclient/authentication.html

Oleg


On Tue, 2004-08-31 at 14:56, Ashraf Fouad wrote:
> Thanks,
> I think as we use MicroSoft ISA server it needs NTCredentials, I
changed
> the code and it gave another error:
> 
> [WARN] HttpMethodBase - -DES encryption is not available.
> HTTP/1.1 407 Proxy Authentication Required ( Access is denied.  )
> 
> Thanks, Best regards
> 
> Ashraf Fouad Ayoub 
> Senior software developer 
> Raya Software 
> 1 Abdel Hameed Lotfy St., 
> Nasr City, Cairo 11371, Egypt 
> Phone: * (202) 670-3301/2/3/4/6/8 Ext. 295 
> Fax:** (202) 670-3296 
> Email: * ashraf_fouad@rayasoftware.com 
> Web: * <http://www.rayasoftware.com/>
> 
> -----Original Message-----
> From: Christoph Kutzinski [mailto:kutzi@gmx.de] 
> Sent: Tuesday, August 31, 2004 1:36 PM
> To: Jakarta Commons Users List
> Subject: Re: httpclient: Behined ISA proxy server and need to reach
> Internet site
> 
> http://jakarta.apache.org/commons/httpclient/authentication.html
> 
> Search for NTLM.
> Looks like you need a NTCredential object.
> 
> Ashraf Fouad wrote:
> 
> > It gave me another error:
> > 
> > [WARN] HttpMethodBase - -Credentials cannot be used for NTLM
> > authentication:
> > org.apache.commons.httpclient.UsernamePasswordCredentials
> > 
> > HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
> > authorization to fulfill the request. Access to the Web Proxy
service
> is
> > denied.  )
> > 
> > 
> > Thanks, Best regards
> > 
> > Ashraf Fouad Ayoub 
> > Senior software developer 
> > Raya Software 
> > 1 Abdel Hameed Lotfy St., 
> > Nasr City, Cairo 11371, Egypt 
> > Phone: * (202) 670-3301/2/3/4/6/8 Ext. 295 
> > Fax:** (202) 670-3296 
> > Email: * ashraf_fouad@rayasoftware.com 
> > Web: * <http://www.rayasoftware.com/>
> > 
> > -----Original Message-----
> > From: Michael Becke [mailto:becke@u.washington.edu] 
> > Sent: Tuesday, August 31, 2004 12:57 PM
> > To: Jakarta Commons Users List
> > Subject: Re: httpclient: Behined ISA proxy server and need to reach
> > Internet site
> > 
> > Hi Ashraf,
> > 
> > I would suggest the following:
> > 
> > client.getState().setProxyCredentials(null, ''192.168.0.200", 
> > proxyCredentials);
> > 
> > Mike
> > 
> > On Aug 31, 2004, at 5:03 AM, Ashraf Fouad wrote:
> > 
> > 
> >>Dears,
> >>
> >>My client machine accesses the Internet through a proxy, I'm writing
> >>http client program to download page source from the Internet, here
is
> >>my code:
> >>
> >>
> >>
> >>    HttpClient client = new HttpClient();
> >>
> >>    HostConfiguration hostConfiguration = 
> >>client.getHostConfiguration();
> >>
> >>    hostConfiguration.setProxy( "192.168.0.200", "8080" );
> >>
> >>
> >>
> >>    HttpState state = client.getState();
> >>
> >>    Credentials proxyCredentials = new UsernamePasswordCredentials(
> >>"username", "password" );
> >>
> >>
> >>
> >>    state.setCredentials( "rayasoftware.com", "192.168.0.200",
> >>proxyCredentials );
> >>
> >>
> >>
> >>    PostMethod cnnPost = new PostMethod( "http://www.cnn.com" );
> >>
> >>    cnnPost.setDoAuthentication( true );
> >>
> >>
> >>
> >>    client.executeMethod( cnnPost );
> >>
> >>    System.out.println( cnnPost.getStatusLine().toString() );
> >>
> >>    // release any connection resources used by the method
> >>
> >>    cnnPost.releaseConnection();
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>I'm getting the following message:
> >>
> >>
> >>
> >>
> >>HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
> >>authorization to fulfill the request. Access to the Web Proxy
service 
> >>is
> >>denied.  )
> >>
> >>[WARN] HttpMethodBase - -No credentials available for the 'null'
> >>authentication realm at 192.168.0.200
> >>
> >>What is wrong with my code.
> >>
> >>
> >>
> >>Thanks, Best regards
> >>
> >>Ashraf Fouad Ayoub
> >>S/W Team leader
> >>Raya Software
> >>
> >>
> >>
> > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
commons-user-help@jakarta.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
commons-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message