CXF 发布WS 1 counts of IllegalAnnotationExceptions 问题

在使用CXF开发WebService时遇到 IllegalAnnotationExceptions 错误,问题源于方法名与接口响应XML名称冲突。将方法名修改为避免与接口名称加'Response'后缀的形式,例如 'testResponse' 改为 'testResult',重启Tomcat后问题解决。此解决方案针对特定情况,不适用于所有相同错误。
摘要由CSDN通过智能技术生成

今天第一次用CXF开发WebService ,在开发的过程中遇到一个问题错误如下:

Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://wsservice.service.ts.com/}testResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
	this problem is related to the following location:
		at com.ts.service.wsservice.vo.TestResponse
		at private com.ts.service.wsservice.vo.TestResponse com.ts.service.wsservice.jaxws_asm.TestResponse._return
		at com.ts.service.wsservice.jaxws_asm.TestResponse
	this problem is related to the following location:
		at com.ts.service.wsservice.jaxws_asm.TestResponse

	at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source)
	at com.sun.xml.internal.bind.v2.runtime.JAXBConte
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值