• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Generated Stub and Proxy Settings !!

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use a generated stub to connect to a web service on the internet.
In my intranet there is a proxy to connect in internet.
When i try to connect to the web service i have the following

java.rmi.RemoteException:

HTTP Status-Code 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ); nested exception is:
HTTP Status-Code 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

How can I configure the stub to use the same proxy settings of my
internet connection?

I try with the system property http.proxyHost and http.proxyPort but don't work.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess you should probably try to use -Dhttp.nonProxyHosts=<name_of_web_service_host>

http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html
[ December 06, 2006: Message edited by: Valentin Crettaz ]
 
Marco Lombardo
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I do what do you write me I obtain :
java.rmi.RemoteException: HTTP transport error: java.net.UnknownHostException: www.webservicex.net; nested exception is:

HTTP transport error: java.net.UnknownHostException: www.webservicex.net

at lombamarc.moneyconv.CurrencyConvertorSoap_Stub.conversionRate(CurrencyConvertorSoap_Stub.java:104)

at lombamarc.moneyconv.Main.main(Main.java:40)

This is normally because I must use the proxy settings to connect in internet (where there is a intenet web service). If I don't use the proxy settings i can't access out of my intranet. The problem is :
How can tell to the stub to use the proxy settings in a correct way?
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marco,

You dont need to tell the Stub rather tell the JVM using the java properties as Val indicated above only i think you must use the following options (keys):
http.proxyHost
http.proxyPort (default: 80 if http.proxyHost specified)

and dont bypass the proxy for the very reason you state that to go to an internet site you must pass through the proxy.

Additionally, if your proxy server requires authentication then also use the following properties: (i think this is what you are missing in your first post error - 407 Proxy server authentication failed).
http.proxyUser
http.proxyPassword

See this Axis doc for client side settings.

Hope this helps.

-Watsh
[ December 07, 2006: Message edited by: Watsh Rajneesh ]
 
Marco Lombardo
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following exception:
java.rmi.RemoteException: HTTP Status-Code 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ); nested exception is:

HTTP Status-Code 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

at lombamarc.moneyconv.CurrencyConvertorSoap_Stub.conversionRate(CurrencyConvertorSoap_Stub.java:104)

at lombamarc.moneyconv.Main.main(Main.java:40)

Caused by: HTTP Status-Code 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

at com.sun.xml.rpc.client.http.HttpClientTransport.checkResponseCode(HttpClientTransport.java:319)

at com.sun.xml.rpc.client.http.HttpClientTransport.connectForResponse(HttpClientTransport.java:252)

at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:88)

at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:96)

at lombamarc.moneyconv.CurrencyConvertorSoap_Stub.conversionRate(CurrencyConvertorSoap_Stub.java:87)


 
Watsh Rajneesh
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And this error is after you have set the http.proxyUser and http.proxyPassword properties also (ie together with http.proxyHost and http.proxyPort)? I have seen this to work in my case in past. I was using Axis 1.2 then in my setup.
 
reply
    Bookmark Topic Watch Topic
  • New Topic