【发布时间】:2017-10-23 04:59:53
【问题描述】:
我有一个带有 JAX-WS 客户端的应用程序。
<jaxws:client name="http://XXXXXX"
wsdlLocation="YYYYY.wsdl"
createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.sts.client" value-ref="ZZZZZZZ" />
</jaxws:properties>
</jaxws:client>
在webservice宕机期间启动应用时,spring上下文失败,应用根本不启动。
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [XXXX]: Constructor threw exception; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https://YYYYY.wsdl'.: java.net.UnknownHostException: YYYYY
Caused by: java.net.UnknownHostException: YYYYY
如何配置应用程序以使其启动并且 spring 配置不会失败。
我了解只要网络服务关闭,网络服务客户端就无法工作。
一旦网络服务可用,我需要应用程序启动并使用它。
【问题讨论】: