-
关于Axis2调用CXF服务端传入参数总是为null的问题20
服务端是用CXF写的,并且用cxf写的客户端能顺利调用,用axis1生成客户端代码也能调用,就是换成Axis2时,传入的参数总是为null
客户端代码如下
@WebService(endpointInterface="com.XXXX.adapter.ITReceptionAdapter",serviceName="ITReceptionAdapter",targetNamespace="http://xx.xxxx.xxx") public class ITReceptionAdapterImpl implements ITReceptionAdapter { private ProcessService service; public void setService(ProcessService service) { this.service = service; } public String process(@WebParam(name="name", targetNamespace = "http://xx.xxxx.xxx")String name,@WebParam(name="password", targetNamespace = "http://xx.xxxx.xxx")String password,@WebParam(name="xmldata", targetNamespace = "http://xx.xxxx.xxx")String xmlData){ System.out.println(name); System.out.println(password); System.out.println(xmlData); return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><cmdbReturn><code>rrrrr</code></cmdbReturn>"; // return service.process(name, password, xmlData); }
客户端代码如下
//RPCServiceClient是RPC方式调用 RPCServiceClient client = new RPCServiceClient(); Options options = client.getOptions(); //设置调用WebService的URL String address = "http://localhost:8080/xxxxxxxxx/outerServices/resSync/ITReceptionAdapter"; EndpointReference epf = new EndpointReference(address); options.setTo(epf); QName qname = new QName("http://xx.xxxx.xxx", "process"); //指定调用的方法和传递参数数据,及设置返回值的类型 Object[] result = client.invokeBlocking(qname, new Object[] { "天然","test","test" }, new Class[] { String.class }); System.out.println(result[0]);
啊!!!!!!!!!!!!!!!!!
2013年1月04日 17:17
相关推荐
cxf客户端调用axis服务端流程
axis2客户端调用服务端,带用户身份认证
cxf客户端调用axis服务端流程.docxcxf客户端调用axis服务端流程.docx
axis2生成客户端服务端代码
axis2客户端调用axis1服务接口 调用方式 使用RPC方式调用WebService,为了防止冲突可以增加 // 与weblogic的lib冲突配置 System.setProperty("javax.xml.stream.XMLInputFactory", ...
webservice axis2 cxf jar包及简单实例
手头上做的java web的项目需要调用.net wcf发布的webservice,查资料看到XFire,Axis2,CXF这三种方式,然后仔细进行了一下对比。资料全来源自网络,不保证完全正确。
描述了Axis2与CXF的特点、区别及适用场合,并对比了效率
现在主流的webService框架,一个是axis2,一个是cxf,本资源是基于cxf框架的简单例子
用框架cxf调用axis2提供的接口服务的一个简单例子,
Spring+Axis2+Maven搭建WebService服务端demo测试用例
Axis2版本学习笔记,CXF版学习笔记,WebServices学习笔记
使用axis调用WebService服务端
基于axis2实现的webservice简单实现(客户端+服务端)。
Axis2与Eclipse整合开发的Web Service的服务端
使用Java+Axis2调用Web Services 网络接口,代码中列举4个例子可以查看,有详细注释提供参考。
本案例实现使用Axis2生成.arr包发布WebService服务,并使用Axis2生成客户端代码方式调用WebService
cxf与axis2框架的区别,用于webservice开发的两个重要框架
<groupId>org.apache.axis2 <artifactId>axis2 <version>1.6.2 <groupId>org.apache.axis2 <artifactId>axis2-adb <version>1.6.2 <groupId>org.apache.axis2 ...