+ -
当前位置:首页 → 问答吧 → xfire客户端调用cxf服务

xfire客户端调用cxf服务

时间:2009-09-10

来源:互联网

xfire客户端调用cxf服务的时候 
传递过去的参数,String 类型的 老是为null 
怎么回事? 
有什么解决办法么

作者: theone_echo   发布时间: 2009-09-10

我也碰到了同样的问题,期待解决....

作者: h521999   发布时间: 2009-12-31

花了一天时间终于解决了

在接口 定义中加入 @WebParam 写入命名空间:
例如

package com.xdja.webservices.service;

---------------------
@WebService
public interface RequestPower 

--------------------
public String test(
@WebParam(name="text", targetNamespace= "http://com.xdja.webservices.service/")String text,
@WebParam(name="text2", targetNamespace= "http://com.xdja.webservices.service/")String text2);

name= "text" 和 name= "text2" 可以不要; targetNamespace 必须要;
com.xdja.webservices.service 用的 此接口类 的包路径

作者: dejatccy   发布时间: 2010-10-14