I'm using Wildfly 10 with Java 8. WEB-INF/jboss-deployment-structure.xml is below, i also tried to put jboss-deployment-structure.xml under META-INF. I want to use JBoss AS as a servlet container with no WS functionalities, so i try to turn off the webservices subsystem.
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sub-deployment name="my.war">
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</sub-deployment>
</jboss-deployment-structure>
But i still get the below error. I think xml doesn't load.
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYWS0059: Apache CXF library (cxf-2.6.2.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.
Give it a try with:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="webservices"/>
<subsystem name="jaxrs"/>
</exclude-subsystems>
<exclusions>
<module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
PS: The correct place is under WEB-INF