• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-WS Client Endpoint as Property?

 
Tonio Morelli
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Peer Reynders
Bartender
Posts: 2933
5
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic