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'。 –