axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <>
Subject AW: 407 Error: Proxy Authentication Required
Date Mon, 26 Sep 2011 09:08:31 GMT


We have similar issues with ANT, with the JDK 6.0 or JDK 1.5.0 from  ORACLE/HP up on which
ANT runs.



QUESTION: what authentication schemas are your proxy server supporting or requesting?



Given your Client can only deal with Basic authentication, but your Proxy Server likes 

to negotiate and your client cannot negotiate but just wants Basic authentication but 

your proxy server wants NTLM, then Authentication will fail.


Because the underlying JAVA SW does either nothing for proper negotiation or does 

it wrong, or the documentation is wrong, or both. 

So it might be good to deliver to the proxy server at least a hint 



This is of equal or more importance then passing a domain.

from ORACLE/SUN gives you an idea.


If you read:

Http Authentication



The HTTP protocol handler implements a number of authentication schemes. 

Sun's implementation of Java SE Version 6 supports the following: 

*	HTTP Basic authentication (RFC2617) 
*	HTTP Digest authentication (RFC2617) 
*	NTLM (defined by Microsoft) 
*	Http SPNEGO Negotiate (defined by Microsoft), with the following underlying mechanisms:

*   Kerberos 

*   NTLM 


Have you read and clearly understood:

ORCALE/SUN claims that their implementation supports . . .



BUT Who in fact engages this HTTP protocol?  Would you consider that your application, your
JAVA code must deal with authentication 

to pass a Firewall / Proxy Server when you read the above at ORACLE/SUN ? NO 

So the JVM should invoke a protocol handler which deals with such issues because ethe -Dhttp.proxySWITCHES
we pass are an information for the JVM at first, but OK can be used by JAVA code as well..


So we think the JVM does not engage a protocol handler properly. 


We come to this conclusion after just a few weeks of troubleshooting 

because ANT cannot use the <get operation unless we add the username and password and more
to the task OR we change ANT to establishes an Authenticator.


But why should ANT code or build procedures deal with BUG's belonging to ORACLE/SUN JAVA?


A friend of mine, Philippe Vouters writes




This Oracle statement at this URL link I sent you in this mail and which is reproduced below
suffers according to me from absolutely no misinterpretation.


Normally, applications do not care which scheme is used to and the implementation automatically
chooses the strongest (most secure) protocol transparently.


As this does NOT match Oracle's Java behavior in Oracle's documented conditions, the bug is
in either this Oracle's statement or in Oracle's Java code. No more no less. The rest is absolutely
NOT my concern.




Le 22/09/2011 19:02, Philippe Vouters a écrit :

> Josef,


> The Oracle document at





Now Fahad, - I know this is basics not axis2, 

but it might help to understand your problem. 


BTW: you may need to watch this using a Wireshark protocol analyzer to see what is going on.


And it is worth reading the articles from ym friend Philippe Vouters: <>


hope this helps. Also what helps and gives you more info thereafter : debugging axis2 transport
sender on such issues.







Von: Fahad cv [] 
Gesendet: Freitag, 23. September 2011 13:45
Betreff: 407 Error: Proxy Authentication Required




I need to access a web service located outside our company. 

Therefore I must use our proxy. But it does not seem to work. Each time I get a 

Transport error: 407 Error: Proxy Authentication Required


I tried following in the code


 HttpTransportProperties.ProxyProperties HTTPProxyProperties = new HttpTransportProperties.ProxyProperties();

     HTTPProxyProperties.setProxyName("our proxy");


     HTTPProxyProperties.setUserName("my user id");

     HTTPProxyProperties.setPassWord(("my password"));

   HTTPProxyProperties.setDomain(("our proxy"));


     Options options = client.getOptions();




I tried below one as well which was worked for one of the user as per this mailing group,
but no luck for me !



Following are the Stack trace


Exception in thread "main" org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy Authentication

      at org.apache.axis2.transport.http.HTTPSender.handleResponse(

      at org.apache.axis2.transport.http.HTTPSender.sendViaPost(

      at org.apache.axis2.transport.http.HTTPSender.send(

      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(

      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(

      at org.apache.axis2.engine.AxisEngine.send(

      at org.apache.axis2.description.OutInAxisOperationClient.send(

      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(

      at org.apache.axis2.client.OperationClient.execute(

      at org.csapi.www.wsdl.parlayx.sms.send.v2_2.service.SendSmsServiceStub.sendSms(

      at org.csapi.www.wsdl.parlayx.sms.send.v2_2.service.SPSendClient.main(


Thanks in advance



View raw message