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
posted 7 years ago
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.