2 counts of IllegalAnnotationExceptions

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36688143/article/details/88396460

把webservice的生成的接口copy到别的模块,运行报错:aused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptionsTwo classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.

解决办法:接口interface里方法的工作空间对应名字错了,应该修改为当前模块,targetNamespace这里要改

@RequestWrapper(localName = "query", targetNamespace = "http://impl.service.mock.www.baidu.com/", className = "com.Query")
@ResponseWrapper(localName = "queryResponse", targetNamespace = "http://impl.service.mock.www.baidu.com/", className = "com.QueryResponse")

猜你喜欢

转载自blog.csdn.net/qq_36688143/article/details/88396460