Securing Spring Web Services: Chapter7

Adding Securities Dependencies in pom.xml to build Project

1.    Here we will see how to add spring ws core and spring ws security dependencies in pom.xml. We can add dependencies in pom as shown in the following xml.

Note that spring ws security depends on Sun Java Streaming XML parser hence it has to be added as a dependency.

Also we have to configure exec-maven-plugin in the build tag to run we created in earlier chapter.

<project xmlns="" xmlns:xsi=""
            <!-- spring-ws-security depends on Sun Java Streaming XML Parser -->

2.       Run the following command from bookstore-web-service-client directory to run the client to test the web service. we will use the add and delete the book request and check the security is working fine.

mvn clean package exec:java

You should see the following output:

Add Request: Book Added Successfully
Get Request: [Name=Spring Web Service, Author=XYZ, price=ABC]
Delete Request: Book Deleted Successfully

No comments :

Post a Comment