File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes JAX-WS Client Endpoint as Property? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS Client Endpoint as Property? " Watch "JAX-WS Client Endpoint as Property? " New topic

JAX-WS Client Endpoint as Property?

Tonio Morelli

Joined: Nov 28, 2004
Posts: 11

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,


SCJP 1.2, SCWCD 1.4, SCBCD 1.3
Peer Reynders

Joined: Aug 19, 2005
Posts: 2933
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.
I agree. Here's the link:
subject: JAX-WS Client Endpoint as Property?
jQuery in Action, 3rd edition