CXF客户端访问服务端四种方式
2012-10-25 13:46
330 查看
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <!-- 第一种方式 --> <!-- <jaxws:endpoint id="helloWorld" implementor="cxf.server.HelloWorldImpl" address="/HelloWorld" /> --> <!-- 第二种方式 --> <!-- <bean id="helloWorldImpl" class="cxf.server.HelloWorldImpl"/> <jaxws:endpoint id="helloWorld" implementor="#helloWorldImpl" address="/HelloWorld"/> --> <!-- 第三种方式 --> <jaxws:server id="helloWorld" serviceClass="cxf.server.HelloWorld" address="/HelloWorld"> <jaxws:serviceBean> <bean class="cxf.server.HelloWorldImpl"/> </jaxws:serviceBean> </jaxws:server> </beans>
第四种方式程序调用:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(PODownstreamWebService.class); factory.setAddress("http://localhost/service/soap/xml/poDownstream"); PODownstreamWebService service = (PODownstreamWebService) factory.create(); PurchaseOrder purchaseOrder = new PurchaseOrder(); service.downPOToPAQ(purchaseOrder);
相关文章推荐
- cxf 动态创建客户端,局域网能正常调用服务端,外网不能访问
- CXF做服务端并且添加了Interceptor,axis2做客户端访问报错的解决办法
- cxf 方式三 是java客户端调用.net服务端 好使代码
- CXF开发WebService客户端请求服务端的方式
- grpc-服务端与客户端四种数据传递方式(2)
- webservice 完整 实现方式 服务端 客户端 (cxf)
- jdk的wsgen.exe和cxf的wsimport.bat建立简单JAX-WS客户端服务端实践
- struts2访问国际化消息的四种方式
- 通过配置PIX防火墙实现FTP客户端对服务端的访问
- android客户端与服务端交互的三种方式
- CXF 开发RESTful WebService服务(Spring+JPA服务端,JAXRS2.0+WebClient客户端)
- VC面向对象的方式 写一个基于TCP的 客户端服务端程序 (SOCKET)
- 一、使用cxf的JaxWsServerFactoryBean创建webservice的服务端和客户端
- 客户端和服务端通讯的N种方式(一)
- TP中的四种url访问方式
- java cxf webservice 生成客户端 调用 服务端
- spring整合cxf 客户端+服务端
- Struts2中访问ServletAPI的四种方式
- php访问url的四种方式
- php SOAP客户端访问 JAVA soap服务端示例