这个问题有谁遇见过?设置spring不去验证wsdl是否存在

spring和xfire结合?client.xml
<?xml version="1.0" encoding="utf-8"?>
<beans>
<bean id="M30" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean" lazy-init="true">
<property name="serviceClass">
<value>cn.net.withub.xfgl.sdyb.webService.service.XfSdybService</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://149.0.12.206:8181/xfgl/xfireServices/xfgl?wsdl</value>
</property>
</bean>
<bean id="M00" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean" lazy-init="true">
<property name="serviceClass">
<value>cn.net.withub.xfgl.sdyb.webService.service.XfSdybService</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://149.0.12.2:8181/xfgl/xfireServices/xfgl?wsdl</value>
</property>
</bean>
</beans>

如果我 M00 的wsdlDocumentUrl 对应的 vaule 如:http:149.0.0.1:22/xfgl...这样的地址。也就是不存在 或者网络不通的情况下?我用

ApplicationContext act=new ClassPathXmlApplicationContext("client.xml");这样加载的时候 他会去验证 我的哪个 wsdlDocumentUrl 是否存在。不存在会抛org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'M00' defined in class path resource [client.xml]: Initialization of bean
failed; nested exception is java.net.ConnectException: Connection timed out: co
nnect
java.net.ConnectException: Connection timed out: connect 这个异常。 如何能够让spring 不去验证哪个wsdl是否存在。或者网络不通的那些wsdl。如果只要出现一个网络不通的情况下 。我的所有的Webservice都不能用了 。这个可怎么办啊 ?今天突然发现这个问题、不知道从怎么着手了 、我希望的是存在的就继续操作。不存在的就不要去管他。我在程序里面在控制。或者设置一个延时?该怎么解决这个问题呢?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值