2 u011376002 u011376002 于 2014.03.11 10:40 提问

webservice cxf服务器端参数是HashMap问题?求大神帮忙。

服务器端接口:
@WebMethod(operationName = "modifyUser")
@WebResult(name = "DataSyncResult")
public DataSyncResult modifyUser(@WebParam(name = "userid")String userid,@WebParam(name = "domainid")String domainid,
@WebParam(name = "attrs")HashMapattrs);

通过wsdl 生成客户端代码之后调用代码:

IDataSyncServiceService hss = new IDataSyncServiceService();
IDataSyncService idata = hss.getIDataSyncServicePort();
HashMap attrs=new HashMap();
attrs.put("logink-email", "123124123@qq.com");
System.out.println(idata.modifyUser("10126", "310112", attrs));

modifyUser方法进去看到不是HashMap:
public DataSyncResult modifyUser(
@WebParam(name = "userid", targetNamespace = "")
String userid,
@WebParam(name = "domainid", targetNamespace = "")
String domainid,
@WebParam(name = "attrs", targetNamespace = "")
com.logink.auth.ws.datasyncservice.ModifyUser.Attrs attrs);

为何不是HashMap

Csdn user default icon
上传中...
上传图片
插入图片