【webservice】Two classes have the same XML type name(转)
2024-09-04 11:37:33
引言
需要调用另一个系统的提供的webservice接口,但是调用之后总是报错,用SoapUI测试接口却没有问题;
那就应该是代码的问题了,但是同样的代码也调用过其他系统却没有问题,不过最终还是解决了,现在记录一下;
问题
Exception in thread "main" com.sun.xml.internal.ws.spi.db.DatabindingException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://app.fms.com/}proxyFunction". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at datasource.rebuild.com.fms.app.ProxyFunction
at public javax.xml.bind.JAXBElement datasource.rebuild.com.fms.app.ObjectFactory.createProxyFunction(datasource.rebuild.com.fms.app.ProxyFunction)
at datasource.rebuild.com.fms.app.ObjectFactory
this problem is related to the following location:
at com.fms.app.ProxyFunction
Two classes have the same XML type name "{http://app.fms.com/}proxyFunctionResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at datasource.rebuild.com.fms.app.ProxyFunctionResponse
at public javax.xml.bind.JAXBElement datasource.rebuild.com.fms.app.ObjectFactory.createProxyFunctionResponse(datasource.rebuild.com.fms.app.ProxyFunctionResponse)
at datasource.rebuild.com.fms.app.ObjectFactory
this problem is related to the following location:
at com.fms.app.ProxyFunctionResponse
解决
找到报错图片里面的那两个类,在类上的注解加上namespace = "http://namespace.thats.not.the.same.as.the.generated"
,如下所示:
第一个类:
第二个类:
转自:https://blog.csdn.net/Francis123580/article/details/79485138
最新文章
- python:mysql+pycharm+Django环境搭建
- (安装linux操作系统)
- java 25 - 4 网络编程之 UDP协议传输思路
- SGU 170	Particles(规律题)
- MVC + JQUERY + AJAX
- ArcEngine部分工作总结
- ECJTUACM16 Winter vacation training #4 题解&;源码
- POPTEST老李分享session,cookie的安全性以及区别 3
- day4 liaoxuefeng---函数
- Android查缺补漏(线程篇)-- IntentService的源码浅析
- OPC协议解析-OPC客户端与服务器通讯解析
- 用chrome模拟微信浏览器访问页面
- Python装饰器 [1]
- 初步学习Xamarin的感受
- Mysql(Mariadb)数据库主从复制
- python 解释器交互模块 -- sys
- 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
- tf.unstack()、tf.stack()
- OAuth 白话简明教程 4.刷新 Access Token
- createjs记录坑
热门文章
- CentOS双网卡双IP设置
- Luogu 3616 富金森林公园
- Entity Framework 6.0 Tutorials(5):Command Interception
- IE6支持兼容max-height、min-height CSS样式
- what is diff. b/w app state &; session state
- 明码——第九届蓝桥杯C语言B组(省赛)第二题
- Java实现四则运算 谢雅淇 袁杏仪
- window7 Oracle卸载步骤
- Android ViewPager + Fragment的布局
- webform Response的一些成员