0
我有一个使用JAX-WS客户端的应用程序。使用jaxws:客户端即使Web服务不可用时启动应用程序
<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配置不会失败。
我知道,只要Web服务关闭,Web服务客户端就不会工作。
我需要应用程序在可用时启动并使用Web服务。
“把WSDL文件放到你的类路径中” - >这就是我的尝试。但是这并没有什么帮助,因为WSDL的导入本身具有可能不可用的'schemaLocation'。 –