Integrating Spring Security with Apache CXF SOAP based web service
In this section, let's create a SOAP-based web service. We will demonstrate the integration of Spring Security with Apache CXF SOAP-based web service.
Creation of SOAP-based web service has become a simple process with Apache CXF.
Getting ready
- Add the CXF-SOAP dependency to the
pom
file. - Add Spring Security-based dependency to the
pom
file. - Set up a SOAP-based web service with
interface
and anImpl
class. - Configure the
spring-security.xml
file. - Add jars to the
Tomcat_7.0/lib
folder as a part of setup. Tomcat requires the following jar files in itslib
folder to work with CXF web services. Absence of these jars can cause some errors:streambuffer.jar
stax-ex
jaxws-ap-2.1
jaxws-rt
How to do it...
The following are the steps to integrate Apache CXF SOAP-based web service with Spring Security:
- The
Book
POJO has getter and setter methods. It also has a parameterized constructor. TheBook
POJO is used in theBookService
interface, to...