I'm trying to call a WebService from Grails using CXF plugin version: 1.1.3
Have generated Java classes for the WSDL via the command:
WsdlToJava "--wsdl=src/java/wsdls/jdeRteListenerService.wsdl --mark -p mypackage.pms.OsrJdeRteSvc -client -impl"
When I went to run the webservice call I would get:
Class not known to this context for class: mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest.
Following this stackoverflow article: JAXB Exception: Class not known to this context
I added to the Port class:
@XmlSeeAlso({mypackage.pms.OsrJdeRteSvc.impl.ObjectFactory.class, mypackage.pms.OsrJdeRteSvc.ListAllEventsRequest.class})
Now I get the error:
Unable to find a JAXB implementation to delegate.
JAXB Source has a comment:
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");
}
I've subscribed to the list but not yet been approved.
Anyway, why am I getting: Unable to find JAXB implementation to delegate?