How to disable SOAP Web Services in WildFly
This is a short tutorial to discuss how to disable JAX-WS Web services (SOAP Web Services) from WildFly application server. We will show how to do it at application level or at subsystem level.
Disabling JAX-WS at Server Level
If you don’t use any JAX-WS feature in all your applications then you can just disable it at server level. In order to do that, we will remove the webservices subsystem and its extension.
Connect to the CLI and execute the following command:
/subsystem=webservices:remove
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
Then, remove the extension:
/extension=org.jboss.as.webservices:remove
{
"outcome" => "success",
"response-headers" => {"process-state" => "reload-required"}
}
You need to restart the server for changes to take effect.
Disabling JAX-WS at deployment level
In order to disable SOAP Web Services for a specific deployment you can use the jboss-deployment-structure.xml file in your application:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="webservices"/>
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
Finally, if your Web application belongs to an EAR archive, then you need to use the sub-deployment element in your configuration to reference it. For example:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
...
<sub-deployment name="myapp.war">
<exclude-subsystems>
<subsystem name="webservices"/>
</exclude-subsystems>
<dependencies>
...
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
To learn more about this deployment unit check this article: Examples of jboss-deployment-structure.xml
Recommended Articles
Deploying SOAP Web Services in Jakarta EE Applications: A Step-by-Step Guide
Learn how to build and deploy SOAP-based web services in Jakarta EE applications, including guidance on the changes in Java SE that removed the JAX-WS API.
Developing SOAP Web Services with JAX-WS: Code-First Approach
Learn how to develop SOAP web services using the code-first approach and JAX-WS, including Java classes and EJB components.
Deploy and Test JAX-WS Web Services on WildFly 31 (JBoss AS 7) - Tutorial
Learn how to deploy and test JAX-WS web services on JBoss AS 7 using Apache CXF web services implementation.
Test SOAP Web Services with Open Source Tools and Java Testing Frameworks
Learn how to test SOAP Web Services using open source testing tools like SOAP UI and Java testing frameworks. Get started with WildFly and Keycloak for your web service.