我正在尝试使用CXF插件版本来调用Grails的WebService:1.1.3
通过以下命令为WSDL生成了Java类:
WsdlToJava "--wsdl=src/java/wsdls/jdeRteListenerService.wsdl --mark -p mypackage.pms.OsrJdeRteSvc -client -impl"
当我去运行网络服务时,我会得到:
此类上下文未知类:mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest。
关注此stackoverflow文章:JAXB Exception: Class not known to this context
我添加到了Port类:
@XmlSeeAlso({mypackage.pms.OsrJdeRteSvc.impl.ObjectFactory.class,mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest.class})
现在我收到了错误:
无法找到要委派的JAXB实现。
JAXB Source有一条评论:
if(!modified) {
// if the class list doesn't contain any of our classes,
// this ContextFactory shouldn't have been called in the first place
// if we simply continue, we'll just end up with the infinite recursion.
// the only case that I can think of where this could happen is
// when the user puts additional classes into the JAXB-generated
// package and pass them to JAXBContext.newInstance().
// Under normal use, this shouldn't happen.
// anyway, bail out now.
// if you hit this problem and wondering how to get around the problem,
// subscribe and send a note to users@jaxb.dev.java.net (http://jaxb.dev.java.net/)
throw new JAXBException("Unable to find a JAXB implementation to delegate");
}
我已订阅该列表但尚未获得批准。
无论如何,为什么我得到:无法找到委托的JAXB实现?