CXF中定义方法时返回值的类名跟方法名不能一样
来源:互联网 发布:手机预装软件不显示 编辑:程序博客网 时间:2024/06/10 14:10
比如:
ListVirtualServerStatuses listVirtualServerStatuses(
@WebParam(name = "req") ListVirtualServerStatusesRequest request);
其实上面的返回值还不是完全一样的,首字母不同,但框架会统一把首字母变成小写。
除此之外,返回值去掉结尾的"Response"后与方法名一致也不行:
ListNodeStatusesResponse listNodeStatuses(
@WebParam(name = "req") ListNodeStatusesRequest request);
否则会报下面的错误:
Two classes have the same XML type name "{http://web.88.**.****.com/}listNodeStatusesResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.****.**.88.web.datamodel.response.ListNodeStatusesResponse
at private com.****.**.88.web.datamodel.response.ListNodeStatusesResponse com.****.**.88.web.jaxws_asm.ListNodeStatusesResponse.listNodeStatusesRsp
at com.****.**.88.web.jaxws_asm.ListNodeStatusesResponse
this problem is related to the following location:
at com.****.**.88.web.jaxws_asm.ListNodeStatusesResponse
Two classes have the same XML type name "{http://web.88.**.****.com/}listVirtualServerStatuses". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.****.**.88.web.jaxws_asm.ListVirtualServerStatuses
this problem is related to the following location:
at com.****.**.88.web.datamodel.response.ListVirtualServerStatuses
at private com.****.**.88.web.datamodel.response.ListVirtualServerStatuses com.****.**.88.web.jaxws_asm.ListVirtualServerStatusesResponse.listVirtualServerStatusesRsp
at com.****.**.88.web.jaxws_asm.ListVirtualServerStatusesResponse
应该是有方法可以设置的,只是没找到。试过WebResult重置名字不行。错误信息里说的重置命名空间名字,没试过。
- CXF中定义方法时返回值的类名跟方法名不能一样
- 在model 中定义get / set 方法时变量名的第二位不能是大写
- Java中静态方法返回类名
- java中自定义的类名不能与java包里面的类名一样
- 构造方法(java中跟类名一样的方法名的作用)
- 构造方法(java中跟类名一样的方法名的作用)
- 方法返回值与类名相同
- Java中 定义语名 与方法 的执行顺序
- 在struts中当对应类中的所有方法相似 且 方法名与返回值名相同时可以这样配置
- java中用静态方法返回类名
- thinkphp 获取当前的方法名,类名,函数名
- cxf发布的webservice方法名变成arg0等现象
- ThinkPHP中方法中的变量名不要跟方法名一致,否则查询会失败
- js中onclick事件用“return”开头+方法名的返回值
- Java语言中,包名、类名、接口名、方法名、变量名,以及常量名的命名有何规范的命名习惯
- Java语言中,包名、类名、接口名、方法名、变量名,以及常量名的命名有何规范的命名习惯
- 在成员方法中获取类名、方法名、行数
- springboot 中使用 AOP 打印 类名、方法名、方法参数名称和方法参数值
- 非阻塞connect
- linux下与windows下的换行符
- C++11 理解 (二十六) 之 多态函数对象包装器
- Android中shape的使用
- NET 程序内存占用问题
- CXF中定义方法时返回值的类名跟方法名不能一样
- MySql 写sql的注意地方
- Rational Rose 2003 下载、破解及安装方法(图文)
- CCreateContext
- RadCartesianChart图表控件对象名称的获取方法
- 浅谈 Oracle 监听器
- 第17章,进程间通信之剪贴板
- wince中创建高优先级高实时性的线程
- POJ 1655 Balancing Act(简单树状DP)