`
Sev7en_jun
  • 浏览: 1213349 次
  • 性别: Icon_minigender_1
  • 来自: 广州
博客专栏
84184fc0-d0b6-3f7f-a3f0-4202acb3caf5
Apache CXF使用s...
浏览量:109931
社区版块
存档分类
最新评论

解决: counts of IllegalAnnotationExceptions and JAXB can't handle interfaces.

 
阅读更多

、Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
        this problem is related to the following location:
                at java.util.Map
                at private java.util.Map com.cecltd.service.jaxws_asm.SayHi.arg0
                at com.cecltd.service.jaxws_asm.SayHi
java.util.Map does not have a no-arg default constructor.         this problem is related to the following location:
                at java.util.Map
                at private java.util.Map com.cecltd.service.jaxws_asm.SayHi.arg0
                at com.cecltd.service.jaxws_asm.SayHi
解决方法:将服务端的services接口返回的Map类型的值,改成HashMap.
结论:在做webServices复杂类型值传递时,返回值的类型不要用接口类型。例如(List应该改为ArrayList,Map改为HashMap等)

分享到:
评论
1 楼 张晓燕 2015-07-27  
帮助很大,受益了

相关推荐

Global site tag (gtag.js) - Google Analytics