Spring 配备 Axis client 动态指定 WSDL
Spring 配置 Axis client 动态指定 WSDLSpring 对 Axis 有了比较好的支持通过WSDL 生成的接口? 只需要通过
Spring 配置 Axis client 动态指定 WSDL
Spring 对 Axis 有了比较好的支持
通过WSDL 生成的接口? 只需要通过配置? 就可以完成 Webservice client 的实现 无需自己动手 简单方便
配置文档如下
- <!--?WEBSERVICE?CLIENT?-->??
- ????<bean?id="ackWebServiceClient"??
- ????????class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean"??
- ????????lazy-init="true">??
- ????????<property?name="serviceFactoryClass"??
- ????????????value="org.apache.axis.client.ServiceFactory"?/>??
- ????????<property?name="serviceInterface"??
- ????????????value="org.thinker.webservice.client.IClient"?/>??
- ????????<property?name="wsdlDocumentUrl"??
- ????????????value="http://localhost:8080/sh_ack_server/services/ackService?wsdl"?/>??
- ????????<property?name="namespaceUri"??
- ????????????value="http://localhost:8080/sh_ack_server/services/ackService"?/>??
- ????????<property?name="serviceName"?value="RemoteACKServerService"?/>??
- ????????<property?name="portName"?value="ackService"?/>??
- ????</bean>??
我们直接用就好了
但有个问题?? 如果我想要用 Spring 的这个 代理类? 即 org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean
但我需要动态的指定 wsdl?/namespace/serviceName/portName 属性 如何才能做到呢 ??