I'm using spring and in my client, a web app, I need to interact with a Jax-WS webservice. I currently have it working via annotating the service interface with the @WebServiceRef annotation. However, I need the wsdlLocation property to be injected because, obviously Sun Microsystems or Oracle, the web service wsdl location in production will be different to what's being used during development.
How can I inject the wsdlLocation?
Here's an extremely simplified version of the code:
//This client service lives in the web app. wsimport used to generate artifacts.
@Component
public class MyClientServiceImpl implements MyClientService {
@WebServiceRef(wsdlLocation = "http://localhost:8080/ws/MyOtherService/the.wsdl", value = MyOtherServiceService.class)
//Interface generated by wsimport
private MyOtherService otherService;
@Override
public List<SomeSearchData> search(String searchString) {
return otherService.search(searchString);
}
}