首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring 配备 Axis client 动态指定 WSDL

2012-11-06 
Spring 配置 Axis client 动态指定 WSDLSpring 对 Axis 有了比较好的支持通过WSDL 生成的接口? 只需要通过

Spring 配置 Axis client 动态指定 WSDL

Spring 对 Axis 有了比较好的支持

通过WSDL 生成的接口? 只需要通过配置? 就可以完成 Webservice client 的实现 无需自己动手 简单方便

配置文档如下

  1. <!--?WEBSERVICE?CLIENT?-->??
  2. ????<bean?id="ackWebServiceClient"??
  3. ????????class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean"??
  4. ????????lazy-init="true">??
  5. ????????<property?name="serviceFactoryClass"??
  6. ????????????value="org.apache.axis.client.ServiceFactory"?/>??
  7. ????????<property?name="serviceInterface"??
  8. ????????????value="org.thinker.webservice.client.IClient"?/>??
  9. ????????<property?name="wsdlDocumentUrl"??
  10. ????????????value="http://localhost:8080/sh_ack_server/services/ackService?wsdl"?/>??
  11. ????????<property?name="namespaceUri"??
  12. ????????????value="http://localhost:8080/sh_ack_server/services/ackService"?/>??
  13. ????????<property?name="serviceName"?value="RemoteACKServerService"?/>??
  14. ????????<property?name="portName"?value="ackService"?/>??
  15. ????</bean>??

我们直接用就好了

但有个问题?? 如果我想要用 Spring 的这个 代理类? 即 org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean

但我需要动态的指定 wsdl?/namespace/serviceName/portName 属性 如何才能做到呢 ??

热点排行