3
當嘗試使用cxf-java2ws-plugin
,又使用JAX-B生成Web服務構件,我得到下面的,看起來像這樣的方法錯誤:是否有可能使地圖<?, ?> someMethod與JAX-B一起工作?
Map<?, ?> myMethod(...);
更改方法簽名是不得已而爲之,所以我正在尋找替代品。
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.company.SomeClass.arg2
at com.company.SomeClass
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