I've been racking my head trying to figure out why the following code is
throwing an exception.
// webservice initialization (same class implements the interface)
XFire xfire = XFireFactory.newInstance().getXFire();
ServiceFactory factory = new ObjectServiceFactory(new
AegisBindingProvider(new
JaxbTypeRegistry(JAXBContext.newInstance("com.i_cubed.dm.model"))));
Service service = factory.create(AdapterProxy.class); // this throws the
exception
xfire.getServiceRegistry().register(service);
// webservice endpoint definition
public interface AdapterProxy
{
public com.i_cubed.dm.model.Container
test(com.i_cubed.dm.model.Container input) throws ProxyException;
}
>From the stack trace (below), it looks like the JAXB generated classes I
have aren't what XFire is expecting to call into. I did find a similar
message to this user list, but the only response I saw was use the JAXB
2.0 and the tool Retrotranslator to work on a 1.4 JVM (which we are
unfortunately stuck having to support).Looking at the documentation and
the website XFire says it supports JAXB 1.1, while the latest I can find
(in JWSDP 1.6) is 1.0.6. Which version of JAXB does XFire depend on, and
where can it be downloaded from? XFire is working well for us other than
this; we've found a workaround of having the Endpoint take only a String
and using AegisBinding to pass the string (which is the JAXB generated
XML) but that is ugly :(
org.codehaus.xfire.XFireRuntimeException: error getting qname of jaxb
type. Nested exception is java.lang.NoSuchMethodException:
com.i_cubed.dm.model.impl.runtime.DefaultJAXBContextImpl.createContainer()
java.lang.NoSuchMethodException:
com.i_cubed.dm.model.impl.runtime.DefaultJAXBContextImpl.createContainer()
at java.lang.Class.getMethod(Class.java:986)
at org.codehaus.xfire.jaxb.JaxbIntrospector.introspect(
JaxbIntrospector.java:30)
at org.codehaus.xfire.jaxb.JaxbType.<init>(JaxbType.java:27)
at org.codehaus.xfire.jaxb.JaxbTypeCreator.createJaxbType(
JaxbTypeCreator.java:71)
at org.codehaus.xfire.jaxb.JaxbTypeCreator.createType(
JaxbTypeCreator.java:56)
at org.codehaus.xfire.aegis.AegisBindingProvider.getSuggestedName(
AegisBindingProvider.java:255)
at
org.codehaus.xfire.service.binding.DefaultServiceConfiguration.getInParameterName(
DefaultServiceConfiguration.java:162)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.getInParameterName(
ObjectServiceFactory.java:1063)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(
ObjectServiceFactory.java:817)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(
ObjectServiceFactory.java:761)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(
ObjectServiceFactory.java:444)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(
ObjectServiceFactory.java:374)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(
ObjectServiceFactory.java:355)
at com.icubed.adapter.proxy.SoapAdapterProxyServer.<init>(
SoapAdapterProxyServer.java:76)
at com.icubed.adapter.proxy.test.SOAPProxyTest.testServer(
SOAPProxyTest.java:28)
Matt McGuire
[EMAIL PROTECTED]