• 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

Can get to wsdl with browser but cannot connect with the client

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have jax-ws web service on mt local host. I also have the client on the local host. On my machine the client consumes the service fine. But when I am behind proxi and the service is consumed from remote host it doesn't work. The interesting thing is that you can access the wsdl on the browser on the remote host but when you run the client it's communication error.

Thanks.
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is probably because your browser is setup correctly with proxy settings so it can show wsdl but your client isn't so it doesn't work.

To fix this issue, most runtimes provide passing properties at the time of code generation, something like
-Dproxy.httpHost=yourPproxyHost -Dproxy.httpPort=yourProxyPort
Check the documentation of your runtime to see what properties to pass.

You may also be able to do this in code
System.getProperties().setProperty("http.proxyUser ", userid);
But again, your runtime should dictate the name of the property to use. Remember to set username and password properties as well if the proxy requires authentication
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a C# client you have to change the configuration file (the client's web.config) or create a System.Net.WebProxy instance, configure it, and then attach it to the web service proxy.



PRB: Error on .NET client that consumes a Web service through an HTTP proxy server

Be sure to specify the port number in the settings especially if you are using SSL (typically port 443).
Web service, web proxy and timeout problem
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An example of working with proxies is available here. I have tested it with Tomcat.
reply
    Bookmark Topic Watch Topic
  • New Topic