• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JAX-WS Client Endpoint as Property?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a question about my web services client. I have a static wsdl file that I use to generate a client with wsimport. From what I see in the generated code, the endpoint URI can only be described with a reference to a wsdl document, but I would like to have the URI of the endpoint stored in a property file somewhere or configured in my web.xml for other environments (test, acceptance, prod).

Is there a way to dynamically set the endpoint URI for a wsimport generated client?

Any help would be appreciated,

-Tonio
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best I have been able to come up with is storing the WSDL location in a property file so that you can use it when you create the Service object. Then it is only a matter of copying the WSDL, modifying the endpoint location in it and using the location of the modified WSDL file.

And usually the WSDL location will change when the endpoint address changes.
reply
    Bookmark Topic Watch Topic
  • New Topic