I have an application that is trying to access a webservice using generated classes via wsdl2java. I would like to be able to configure it so that I can use a different endpoint based on the environment (TEST/PROD).
I found the following answer to be exactly what I was looking for https://stackoverflow.com/a/3569291/346666
However, I would like to use Spring to inject an instance of the service into my service layer - is there a pure Spring approach to the above?
Or, is there a better way to inject an instance of a webservice into a class and still be able to dynamically configure the endpoint?