Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用jaxws:client启动应用程序,即使web服务不可用_Java_Spring_Cxf_Jax Ws - Fatal编程技术网

Java 使用jaxws:client启动应用程序,即使web服务不可用

Java 使用jaxws:client启动应用程序,即使web服务不可用,java,spring,cxf,jax-ws,Java,Spring,Cxf,Jax Ws,我有一个带有JAX-WS客户端的应用程序 <jaxws:client name="http://XXXXXX" wsdlLocation="YYYYY.wsdl" createdFromAPI="true"> <jaxws:properties> <entry key="ws-security.sts.client" value-ref="ZZZZZZZ" /> </

我有一个带有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>
如何配置应用程序,使其启动且spring配置不会失败。
我知道只要web服务关闭,web服务客户端就无法工作。

一旦web服务可用,我需要应用程序启动并使用它。

您可以将WSDL文件放在类路径中,并在wsdlLocation中找到它

wsdlLocation=“yyyyy.wsdl”


或者你可以通过编程来处理它。详细信息

“将WSDL文件放入类路径”->这就是我所尝试的。但这并没有多大帮助,因为wsdl有自己可能不可用的
schemaLocation
s的导入。
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