I'm using Spring's ContextLoaderListener to initialise a web services client, but if the wsdl document is not available during the application startup then part of my application is broken and I'm not sure how to fix it. The application starts successfully, just logging a big ol' stack trace at that point. The exception is:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myWebService' defined in class path resource [spring-myapp-jaxws.xml]: Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: The following WSDL exception occurred... etc.
Couple of questions...
- Can I catch the init exception so that I can show the state of the broken component appropriately in my application?
- Can I tell Spring to try and reinitialise the myWebService bean on user request?