【webservice】Two classes have the same XML type name(转)
引言
需要调用另一个系统的提供的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
【webservice】Two classes have the same XML type name(转)的更多相关文章
- 【Webservice】2 counts of IllegalAnnotationExceptions Two classes have the same XML type name
在使用客户端调用服务端的时候发生了2 counts of IllegalAnnotationExceptions Two classes have the same XML type name的错误, ...
- Two classes have the same XML type name 排错【转】
今天遇到一个问题,webservice发布的时候报下面的错误: <strong>Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotati ...
- CXF报错[1 counts of IllegalAnnotationExceptions]and[Two classes have the same XML type name]and[Use @XmlType.name and @XmlType.namespace to assign different names to them]
启动时CXF报错如下: Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalA ...
- webservice接口测试wsdl,参数是xml格式。python,入参转化成str,返回值转化成dict调用
1.用SoapUI测试webservice接口,传入参数是xml格式时.xml格式需要将xml的外围增加<![CDATA[xml]]> 2.但是用python去做webservice测试, ...
- WebService如何根据对方提供的xml生成对象
最近写接口接到一个需求,就是他们推送数据过来,我们这边来提供服务接口. 对方用的是.NET WebService,已经把所有的对象格式定义好了,可能是为了顾及各个平台的通用性,所以只在文档中提供了xm ...
- 有WebService的项目中写applicationContex.xml文件时应注意!!!
这是一个简单的WebService实例,来看下如下的applicationContex.xml文件: 1.有XFire的配置 <bean id="baseWebService" ...
- Maven项目编译后classes文件中没有.xml问题
在做spring+mybatiss时,自动扫描都配置正确了,却在运行时出现了如下错误.后来查看target/classes/.../dao/文件夹下,发现只有mapper的class文件,而没有xml ...
- [原]Maven项目编译后classes文件中没有.xml问题
在做spring+mybatiss时,自动扫描都配置正确了,却在运行时出现了如下错误.后来查看target/classes/.../dao/文件夹下,发现只有mapper的class文件,而没有xml ...
- 手把手教你SOAP访问webservice并DOM解析返回的XML数据(转)
http://blog.csdn.net/u012534831/article/details/51357111 前言: 目前我们项目组还在采用webservice这种http方式,并且某些网站服务提 ...
随机推荐
- 如何将Eclipse中的开源项目使用到Android Studio中
近几日,笔者用到了一些开源项目,比如著名的PTR项目.但是在使用的过程中,遇到了一些问题. 这个开源库是在Eclipse上面写的,我们现在开发用的是Android stuido. 两种软件的项目结构是 ...
- 在cmd中 操作 数据库 MySQL 的一些命令
环境变量配置配置好以后, 打开cmd 连接:mysql -h主机地址 -u用户名 -p用户密码 (注:u与root可以不用加空格,其它也一样) 断开:exit (回车) 创建授权:grant sele ...
- ZOJ 3956 Course Selection System
题意 有n节课可供选择,每节课都有两个值Hi和Ci,如果学生选择了m节课(x1,x2,....,xm),则它的舒适值被定义为: //这里没有公式((lll¬ω¬)),因为那个图片我保存不下来≧ ﹏ ≦ ...
- codeforce452DIV2——F. Letters Removing
题意:给一个字符串和m个操作,每次给出l,r,c,把字符串中l-r这段区间的字符为c的字符删掉,求最后的字符串.(n,m<=2e5)线段树.注意这个区间修改和普通区间修改的区别. 他们都是用树状 ...
- 485. Max Consecutive Ones最长的连续1的个数
[抄题]: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Inpu ...
- SqlServer-truncate && delete && drop 的区别
有些人在删除表的所有记录的时候,喜欢这样来——不给DELETE 语句提供WHERE 子句,表中的所有记录都将被删除.但这种方法是不可取的,正确的应该使用 TRUNCATE TABLE tb_name ...
- Hyperledger Fabric开发
打开Hyperledger Fabric在线开发文档:https://hyperledger-fabric.readthedocs.io 建议在Mac或Linux环境下操作,因为文档基本上是按照Mac ...
- 在IE11(Win8)中检查up6.2配置
1.按F12,打开调试模式 2.打开调试程序选项卡 说明:在调试程序选项卡中可看到IE加载的脚本信息是否正确.因为IE有缓存,导致脚本有时不是最新的. 3.打开脚本,up6.js ...
- QT背景
Qt是一个跨平台的C++图形用户界面应用程序框架.它为应用程序开发者提供建立基于window界面所需的功能. Qt是诺基亚公司的一个产品.1996年,Qt进入商业领域,已成为全世界范围内数千种成功的应 ...
- 问渠那得清如许?为有源头活水来。——java面向对象的思想
20169205 2016-2017-2 <移动平台应用开发实践>第2周学习总结 教材学习内容总结 本次作业要求的部分主要是Java高级语言实现面向对象编程的基本方法,其中所介绍的面向对象 ...