我的apache cxf客戶端web服務得到了如下所示的異常。但是,「XML類型名稱」地址「」是我的WSDL的soap:地址位置。問題是什麼?com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:2個IllegalAnnotationExceptions計數
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
at javax.xml.ws.wsaddressing.W3CEndpointReference
分享您的部分代碼和WDSL。但例外情況非常清楚。兩個類使用相同的名稱屬性(「地址」)註釋。 – DiogoSantana 2013-03-28 18:00:01
其實沒有地址屬性。這個地址只是WSDLs的soap地址。我已經解決了這個問題。當你使用服務器端服務的spring + jaxws和另一個客戶端服務使用apache + cxf時,WSDL的端點地址屬性會產生衝突。 THUS,我爲這兩種服務都使用了apache-cxf + spring。非常感謝 – chuck 2013-04-09 16:36:49
爲什麼你不把你的評論作爲答案,所以這個問題不會留下未解答的問題,以後可能會有所幫助。 – DiogoSantana 2013-04-09 21:19:01