wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 2921
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: http://aspose.com/file-tools
subject: JAX-WS Client Endpoint as Property?
Similar Threads
Configure wsimport to not insert wsdl location in client service class?
disable xjc(JAXB generation) in wsimport task
many questions about ws
JAX-WS Question
Confusion in writing web service client + jax-ws