Axis+JaxRpcPortProxyFactoryBean设置timeout
一直不知道怎么使用JaxRpcPortProxyFactoryBean的时候设置timeout,
前段时间仔细看了一下 JaxRpcPortProxyFactoryBean的源码,发现他有个属性是customPropertyMap可以用来设置自定义的一些配置信息.
而就算设置了 customPropertyMap了也不一定有用,因为它是配合portInterface来使用的,没有portInterface的话也不会去执行preparePortStub()方法..
所以记得要设置了 portInterface才行哦
例子如下:
<bean id=”tempConvert”
class=”org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean”>
<property name=”serviceFactoryClass”
value=”org.apache.axis.client.ServiceFactory”/>
<property name=”serviceInterface”
value=”axis.test.TempConvertSoap_PortType”/>
<property name=”wsdlDocumentUrl” value=”http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"/>
<property name=”namespaceUri” value=”http://tempuri.org/"/>
<property name=”serviceName” value=”TempConvert”/>
<property name=”portName” value=”TempConvertSoap”/>
<property name=”portInterface” value=”axis.test.TempConvertSoap_PortType”/>
<property name=”customPropertyMap”>
<map>
<entry key=”axis.connection.timeout”>
<value type=”java.lang.Integer”>10000</value>
</entry>
</map>
</property>
</bean>