• ICONAxis+JaxRpcPortProxyFactoryBean设置timeout

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://canyousee.blogbus.com/logs/47582737.html

    一直不知道怎么使用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>


    随机文章:

    S.O.D.A理解 2007-12-10

    收藏到:Del.icio.us