【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方式,并且某些网站服务提 ...
随机推荐
- Redis搭建(一):单实例
环境:CentOS6.4 + redis3.2.4 一.安装 cd /opt tar -zxf redis-3.2.4.tar.gz make make install PREFIX=/usr/loc ...
- Objects & Class
[Objects & Class] 1.定义一个类. 上述代码中,numberOfSides是实例变量,simpleDescription也是实例方法. 2.创建实例,使用实例. 3.init ...
- Theos初步
[Theos初步] 1.安装Theos.Theos需要在mac和ios上均安装,ios上安装的是Theos服务器,以使得mac的thoes可以直接安装app到ios设备上.如果不需要使用此功能,则仅安 ...
- 03.WSDL分析
自己做一个程序放到tomcat里面这个就是服务,自己安装一个oracle,oracle启动之后那它本身就是一种服务. WebService就是HTTP,那么它和HTTP有什么不同呢? HTTP GET ...
- FastDFS介绍和配置过程 二
最近在研究负载均衡和集群,其中涉及到一个主要问题是,如何让集群中的real server共享一套文件系统.在网上查到FastDFS,国人(happy fish,感谢他的开源精神)开发的一套轻量级分 ...
- centos 搭建docker环境
我有一台便宜的腾讯云服务器,当然配置自然也是最低的,只是用来平常玩一玩,学习的用处,下面介绍一下我在上面搭建docker的心得,共勉一下. 安装与配置 Docker 安装 Docker Docker ...
- Installing R under Unix-alikes
Linux上R的安装 可参考https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-Unix_ ...
- keydown、input 和 keyup 事件
keydown.keyup 属于键盘事件,input 属于文本事件. keydown:当用户按下键盘上的任意按键时触发,如果按住不放,会重复触发此事件. keyup:当用户释放键盘上的按键时触发. i ...
- 关于spring”通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明“的错误
关于spring配置的问题 近日学习spring时遇到了这个问题: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcept ...
- wc.exe指令(C++)
https://github.com/kielingpao/wc 项目相关要求 wc.exe 是一个常见的工具,它能统计文本文件的字符数.单词数和行数.这个项目要求写一个命令行程序,模仿已有wc.ex ...