0 Replies Latest reply on Jun 28, 2013 7:58 AM by crewman

    Using EclipseLink MOXy as JAXB provider for JAX-WS on JBoss EAP 6.1

    crewman Newbie

      I'm trying to use EclipseLink MOXy as JAXB provider for JAX-WS web-service deployed on JBoss EAP 6.1.0.Beta1 application server. For now I've implemented javax.xml.ws.Provider as described here and placed jaxb.properties file into packages containing my Provider implementation and domain classes used in the web-service. Here is a content of this file:

       

      {code}javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory{code}

      When I try to deploy web-application containing the service I have the following error in log:

       

      {quote}@XmlValue is not allowed on a class that derives another class{quote}

      The main reason to use MOXy as JAXB-provider in my case is to be able to use @XmlValue annotation in subclasses. This error doesn't occure when I try to unmarshall with the same classes as used for the web-service in a test application using MOXy. Furthermore , there are no classes from org.eclipse.persistence package and its subpackages in a stacktrace, only com.sun.xml.bind.v2 classes instead. Apparently, MOXy isn't used when the web-application being deployed. All required Maven artifacts from org.eclipse.persistence is in WAR-file:

       

      {code}$ jar tf my-app.war | grep org.eclipse.persistence

      WEB-INF/lib/org.eclipse.persistence.antlr-2.5.0.jar

      WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar

      WEB-INF/lib/org.eclipse.persistence.moxy-2.5.0.jar

      WEB-INF/lib/org.eclipse.persistence.core-2.5.0.jar{code}

      What am I doing wrong? As far as I understand, Provider is called in runtime when web-service is invoked. But the error occurs in deploy time. Should I reimplement something in addition to Provider?