Я пытаюсь вызвать WebService из Grails, используя версию плагина CXF: 1.1.3.
Создали классы Java для WSDL с помощью команды:
WsdlToJava "--wsdl=src/java/wsdls/jdeRteListenerService.wsdl --mark -p mypackage.pms.OsrJdeRteSvc -client -impl"
Когда я пошел запускать вызов веб-сервиса, я получил:
Класс, неизвестный в этом контексте для класса: mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest.
После этой статьи stackoverflow: Исключение JAXB: класс неизвестен в этом контексте а>
Я добавил в класс Port:
@XmlSeeAlso({mypackage.pms.OsrJdeRteSvc.impl.ObjectFactory.class, mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest.class})
Теперь я получаю сообщение об ошибке:
Не удалось найти реализацию JAXB для делегирования.
Источник JAXB имеет комментарий:
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 [email protected] (http://jaxb.dev.java.net/)
throw new JAXBException("Unable to find a JAXB implementation to delegate");
}
Я подписался на список, но еще не был одобрен.
В любом случае, почему я получаю: Не удалось найти реализацию JAXB для делегирования?