Im trying to deploy a project containing an JAX-WS Interface to a wildfly 8.2 server. The project is packed as a war. Within that project I would like to use interceptors.
import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
public class ReplyToHeaderInInterceptor extends AbstractSoapInterceptor { /*code*/}
I'm using Maven with the "provided" tag, in order to not receiving the following error:
Apache CXF library (cxf-rt-bindings-soap-3.1.1.jar) detected in ws endpoint deployment; either provide a proper deployment replacing embedded libraries with container module dependencies or disable the webservices subsystem for the current deployment adding a proper jboss-deployment-structure.xml descriptor to it. The former approach is recommended, as the latter approach causes most of the webservices Java EE and any JBossWS specific functionality to be disabled.
That looks like this:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.1.1</version>
<scope>provided</scope>
</dependency>
But if I do so the library cannot be found at runtime:
Caused by: java.lang.NoClassDefFoundError: org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor
I have already tried adding the dependency via the MANIFEST.MF file using maven:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<configuration>
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
<warName>backend</warName>
<archive>
<manifestEntries>
<Dependencies>org.apache.cxf</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
I don't know what to do, any suggestions?