Hi, I have a bit of a particular situation at the moment. I have understood the configuration of the embedded Jetty configuration and now I need to put it to use. :)
I have the following two scenarios: 1. I have a "Server" which reads the Jetty configuration and publishes a service using the JaxWsServerFactoryBean . The same maven project includes all the relevant JAXB annotated classes, the interface with the @WebService annotation, the implementation of the service etc.This configuration works fine, as expected. 2. I have the same "Server" in a separate project and it accepts a Jar file (in which a web service is configured) from which it reads the service configuration and deploys the relevant service. The Jar file contains all the JAXB and other relevant classes.The Server uses the JaxWsServerFactoryBean to publish the service. This configuration loads the jar in a separate class loader and that's where my problems begin.. Initially, I had a problem since I was getting an exception saying the jaxb.index file could not be found. This file does not exist indeed, but it never was an issue when running it in the same class loader (Scenario 1.). I fixed that by manually creating the jaxb.index file, so was happy with at least a temporary workaround. But then new exceptions occurred complaining about "ClassA is an interface and JAXB can't handle interfaces". Among others, it complains about the annotated web service interface?! I have read about some ways of using annotations and XmlTypeAdaptors to work around this but it does not feel right, especially since it all works fine when I run it in the first scenario. I am using JCL as the custom class loader. Is there anything wrong in my configuration, or perhaps CXF shouldn't/can't be used this way? Any suggestions? Thanks and kind regards, Aleks
