Maven-based Mule application showcasing the configuration of secured SOAP web services.
Mule is an Enterprise Service Bus, meant to connect together online applications. This example just touches an specific part of the web services support it offers, to be precise the security layer, and is prepared for the Community Edition.
It includes an endpoint for each type of endpoint Mule supports, which are four ways of implementing a CXF endpoint and an endpoint consumer. To these all the possible security protocols (unsecured, password, signed and encrypted) are applied.
It is meant to be just an example, and for that reason is kept as simple as possible, avoiding the use of external web services. Still it tries to show how a real application would be built, and is divided into layers, including services and persistence, created with the help of Spring.
The project offers various examples showing how to set up the various security options offered by Mule:
- Unsecured
- Password protected
- Password protected with SAML
- Signed
- Encrypted
These are applied to the different web services implementations which Mule supports:
- CXF with a code-first JAX-WS frontend, created from custom JAXB classes
- CXF with a WSDL-first JAX-WS frontend, created from generated JAXB classes
- CXF with a plain frontend, created from POJOs
- CXF with a proxy frontend, which handles plain SOAP messages instead of beans
- Consumer, which takes the body of a SOAP message and transforms it for the other services
All the endpoints receive a request, try to acquire an object from the persistence layer and then return a response with it.
For each of them a HTTP client is included.
There are also several tests ensuring that the flows and endpoints work as expected.
The application is coded in Java, using Maven to manage the project.
The project has been tested on the following Java versions:
- JDK 8
- JDK 7
- OpenJDK 7
As it is a Mule project, it also requires the following Mule version:
- Mule 3.7.0CE
All other dependencies are handled through Maven, and noted in the included POM file. This includes the plugins used for running the demo in an embedded web server.
The easiest way to run the demo is using the Anypoint Studio run option.
By default the web services will be deployed to the following URL:
http://localhost:8080/mule-wss
The following URLs allow using the various implementations of the SOAP service.
The endpoint consumer does not support querying for the WSDL, and only accepts the body of a SOAP message.
The following URLs allow making use of the HTTP client for the local web service.
To change the entity queried just change the id value on the URL.
Any kind of help with the project will be well received, and there are two main ways to give such help:
- Reporting errors and asking for extensions through the issues management
- or forking the repository and extending the project
Issues are managed at the GitHub project issues tracker, where any Github user may report bugs or ask for new features.
If you wish to fork or modify the code, visit the GitHub project page, where the latest versions are always kept. Check the 'master' branch for the latest release, and the 'develop' for the current, and stable, development version.
The project has been released under the MIT License.