Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces
Posted 力群
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces相关的知识,希望对你有一定的参考价值。
Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces 错误解决方法
错误栈:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
demo.order.dao.ParamDao is an interface, and JAXB can‘t handle interfaces.
this problem is related to the following location:
at demo.order.dao.ParamDao
at private demo.order.dao.ParamDao demo.jaxrs.server.jaxws_asm.SetParamDao.arg0
at demo.jaxrs.server.jaxws_asm.SetParamDao
demo.order.dao.ParamDao does not have a no-arg default constructor.
this problem is related to the following location:
at demo.order.dao.ParamDao ....
解决方法:标记该方法为非web method
private ParamDao paramDao;
@WebMethod(exclude = true)
public void setParamDao(ParamDao paramDao) {
this.paramDao = paramDao;
}
ref: http://www.mkyong.com/webservices/jax-ws/spring-jax-ws-xxx-is-an-interface-and-jaxb-cant-handle-interfaces/
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
demo.order.dao.ParamDao is an interface, and JAXB can‘t handle interfaces.
this problem is related to the following location:
at demo.order.dao.ParamDao
at private demo.order.dao.ParamDao demo.jaxrs.server.jaxws_asm.SetParamDao.arg0
at demo.jaxrs.server.jaxws_asm.SetParamDao
demo.order.dao.ParamDao does not have a no-arg default constructor.
this problem is related to the following location:
at demo.order.dao.ParamDao ....
解决方法:标记该方法为非web method
private ParamDao paramDao;
@WebMethod(exclude = true)
public void setParamDao(ParamDao paramDao) {
this.paramDao = paramDao;
}
ref: http://www.mkyong.com/webservices/jax-ws/spring-jax-ws-xxx-is-an-interface-and-jaxb-cant-handle-interfaces/
以上是关于Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces的主要内容,如果未能解决你的问题,请参考以下文章
Jax-ws 开发webService ,并使用spring注入service类中遇到 空指针
Spring 整合CXF 实现WebService(JAX-WS)