Spring Web Services 2 Cookbook


Spring Web Services 2 Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Create contract-first Web services
  • Explore different frameworks of Object/XML mapping
  • Secure Web Services by Authentication, Encryption/Decryption and Digital
    Signature
  • Learn contract-last Web Services using Spring Remoting and Apache CXF
  • Implement automated functional and load testing
  • Develop RESTful Web-Services
  • Log and trace SOAP messages

Book Details

Language : English
Paperback : 322 pages [ 235mm x 191mm ]
Release Date : February 2012
ISBN : 1849515824
ISBN 13 : 9781849515825
Author(s) : Hamidreza Sattari, Shameer Kunjumohamed
Topics and Technologies : All Books, Web Development, Cookbooks, Java, Open Source, Web Services

Table of Contents

Preface
Chapter 1: Building SOAP Web-Services
Chapter 2: Building Clients for SOAP Web-Services
Chapter 3: Testing and Monitoring Web-Services
Chapter 4: Exception/SOAP Fault Handling
Chapter 5: Logging and Tracing of SOAP Messages
Chapter 6: Marshalling and Object-XML Mapping (OXM)
Chapter 7: Securing SOAP Web-Services using XWSS Library
Chapter 8: Securing SOAP Web-Services using WSS4J Library
Chapter 9: RESTful Web-Services
Chapter 10: Spring Remoting
Index
  • Chapter 1: Building SOAP Web-Services
    • Introduction
    • Using Maven for building and running a Spring-WS project
    • Creating a data contract
    • Setting up a Web-Service using DispatcherServlet
    • Simplifying the creation of a Web-Service using MessageDispatcherServlet
    • Setting up a Web-Service on JMS transport
    • Setting up a Web-Service on E-mail transport
    • Setting up a Web-Service on embedded HTTP transport
    • Setting up Spring-WS on XMPP transport
    • Setting up a contract-first Web-Service
    • Setting up a simple endpoint mapping for the Web-Service
    • Setting up an endpoint by annotating the payload-root
    • Setting up a transport-neutral WS-Addressing endpoint
    • Setting up an endpoint using an XPath expression
    • Handling the incoming XML messages using DOM
    • Handling the incoming XML messages using JDOM
    • Handling the incoming XML messages using JAXB2
    • Validating the XML messages at the server side using an interceptor
    • Chapter 2: Building Clients for SOAP Web-Services
      • Introduction
      • Setting up a Web-Service client development environment within Eclipse
      • Setting up a Web-Service client development environment using Maven
      • Creating a Web-Service client on HTTP transport
      • Creating a Web-Service client on JMS transport
      • Creating a Web-Service client on E-mail transport
      • Setting up a Web-Service on XMPP transport
      • Creating a Web-Service client using XPath expressions
      • Creating a Web-Service client for a WS-Addressing endpoint
      • Transforming a Web-Service message using XSLT
      • Chapter 3: Testing and Monitoring Web-Services
        • Introduction
        • Integration testing using Spring-JUnit support
        • Server-side integration testing using MockWebServiceClient
        • Client-side integration testing using MockWebServiceServer
        • Monitoring TCP messages of a Web-Service using TCPMon
        • Monitoring and load/functional testing of a Web-Service using soapUI
        • Chapter 4: Exception/SOAP Fault Handling
          • Introduction
          • Handling server-side exceptions by returning the exception's message as a SOAP fault string
          • Mapping exception class names to SOAP faults
          • Annotating exception classes with @SOAPFault
          • Writing your own exception resolvers in Spring-WS
          • Chapter 5: Logging and Tracing of SOAP Messages
            • Introduction
            • Logging message payload manually
            • Logging both request and response SOAP Envelopes using log4j
            • Logging both request and response using Spring-WS's Interceptors
            • Using Eclipse IDE to debug a Spring-WS
            • Chapter 6: Marshalling and Object-XML Mapping (OXM)
              • Introduction
              • Marshalling with JAXB2
              • Marshalling with XMLBeans
              • Marshalling with JiBX
              • Marshalling with XStream
              • Marshalling with MooseXML
              • Creating a custom marshaller using XPath for conditional XML parsing
              • Chapter 7: Securing SOAP Web-Services using XWSS Library
                • Introduction
                • Authenticating a Web-Service call using plain/digested username token
                • Authenticating a Web-Service call using Spring security to authenticate a username token with a plain/digested password
                • Authenticating a Web-Service call using a JAAS service to authenticate a username token
                • Preparing pair and symmetric keystores
                • Securing SOAP messages using digital signature
                • Authenticating a Web-Service call using X509 certificate
                • Encrypting/decrypting of SOAP messages
                • Chapter 8: Securing SOAP Web-Services using WSS4J Library
                  • Introduction
                  • Authenticating a Web-Service call using a username token with a plain/digest password
                  • Authenticating a Web-Service call using Spring security to authenticate a username token with a plain/digest password
                  • Securing SOAP messages using a digital signature
                  • Authenticating a Web-Service call using an X509 certificate
                  • Encrypting/decrypting SOAP messages
                  • Chapter 9: RESTful Web-Services
                    • Introduction
                    • Setting up a Spring RESTful Web-Service using RESTful features in Spring MVC
                    • Using the REST Client tool to access Spring RESTful Web-Service
                    • Setting up a Spring RESTful Web-Service using HTTP message conversion
                    • Creating a WS Client for the Spring RESTful Web-Service using Spring template classes
                    • Chapter 10: Spring Remoting
                      • Introduction
                      • Setting up Web-Services using RMI
                      • Setting up a servlet-based Web-Service using Hessian/Burlap, exposing business beans
                      • Setting up Web-Services using JAX-WS
                      • Exposing servlet-based Web-Services using Apache CXF
                      • Exposing Web-Services using JMS as the underlying communication protocol

                      Hamidreza Sattari

                      Hamidreza Sattari started software development in 2002. He has been involved in several areas of Software Engineering--programming to architecture to management. His area of interest has been integration among enterprise applications and SOA. Hamidreza Sattari earned his MSc in Software Engineering in 2008 from Herriot Watt University, UK and his Bachelor's Degree in 1994 in Electrical Engineering (Electronics) from Tehran Azad University, Iran. In recent years his research area of interest has been scientific data mining, using algorithms and statistical techniques in pattern recognition, estimation and machine learning.

                      Shameer Kunjumohamed

                      Shameer Kunjumohamed is a software architect, specialized in enterprise application integrations and SOA. He is well versed in J2EE and Microsoft.Net platforms. He is interested in various mobile platforms including Android, Black berry and other cross-platform mobile frameworks these days. After graduating from Calicut University, India in 2000, Shameer handled different roles in software engineering. He graduated his Masters Degree in Software Engineering from Herriot Watt University, UK from Dubai International Academic City in 2009. At present he works as a Solutions Architect in Dubai, UAE, and is a guest lecturer in the same university for the Masters students in Information Technology.

                      Code Downloads

                      Download the code and support files for this book.


                      Submit Errata

                      Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                      Errata

                      - 1 submitted: last submission 14 May 2013

                      Errata type: Others | Page number: 39 | Errata date: 8-3-2013

                       

                      First bullet point reads: while contract-last precisely exchanges the required data and maximizes the performance
                      Should be: while contract-first precisely exchanges the required data and maximizes the performance
                      

                       

                       

                      Sample chapters

                      You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                      Frequently bought together

                      Spring Web Services 2 Cookbook +    Alfresco 4 Enterprise Content Management Implementation =
                      50% Off
                      the second eBook
                      Price for both: $45.60

                      Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                      What you will learn from this book

                      • Setting up SOAP Web-Services using various protocols such as HTTP, JMS, XMPP, Email and so on
                      • Implementing Web-Service's Endpoint using technologies such as DOM, JDOM, XPATH, and Marshaller
                      • Testing Web-Services using latest features of Spring-WS
                      • Creating and monitoring automated testing using tools such as soapUI and TCPMon
                      • Marshalling and Un-Marshalling using Jaxb2, XMLbeans, Xstream and other technologies
                      • Securing your Spring Web Service through encryption, decryption, digital signature authentication and authorization
                      • Implement a Web-Service using Spring-Remoting on RMI, Hessian/Burlap, JAX-WS, JMS technologies and a Web-Service using Apache CXF on JAXWS front-end
                      • Developing REST Web-Service server and client using Spring RESTful Support

                      In Detail

                      Spring Web Services is a product of the Spring community focused on creating document-driven Web services.

                      Spring Web Services aims to facilitate contract-first SOAP service development, allowing for the creation of flexible web services using one of the many ways to manipulate XML payloads.

                      This comprehensive guide -- which provides professional expertise on a variety of technical topics right from setting-up a contract-first Web-Service, creating client of a Web-Service to serialization, monitoring, testing and security using Spring-WS -- helps you enhance your skills in Spring Web Services.

                      Spring Web Services 2 Cookbook includes a wide variety of recipes that covers most important topics used in real-world applications. It is a well-rounded guide covering a lot of ground in the Spring Web Services domain using systematic arranged chapters and focused recipes.

                      The book begins with setting up a contract first Web Service over various protocols such as JMS, XMPP, and Email. The next chapter targets creating clients for SOAP Web Services. We then learn how to test and monitor the Web Service using tools like soapUI and TCPMon. Building on, logging, tracing and exception handling are detailed in the subsequent chapter. The book then covers marshalling and unmarshalling using different technologies like JAXB2, XMLBeans, JibX, XStream, MooseXML etc. Securing WebServices through authentication, authorization, encryption and decryption and digital signature using Spring-WS features based on XWSS and WSS4J Libraries is outlined in the next chapter two chapters. The book then tackles development of RESTful Web Services. Finally, Setting up Web Services using Spring Remoting based on various technologies like HTTP , RMI, JMS, JAXWS and a Web Service using Apache CXF on JAX-WS front-end are explained.

                      This book will help relatively new developers in accelerating their learning process and experienced developers in expanding their skills sets of Spring Web Services.

                      Approach

                      This is a cookbook full of recipes with the essential code explained clearly and comprehensively. Each chapter is neatly compartmentalized with focused recipes which are perfectly organized for easy reference and understanding.

                      Who this book is for

                      This book is for Java/J2EE developers. As the books covers a variety of topics in Web-Service development, it will serve as a reference guide to those already familiar with Web-Services. Beginners can also use this book to gain real-world experience of Web-Service development.

                      Code Download and Errata
                      Packt Anytime, Anywhere
                      Register Books
                      Print Upgrades
                      eBook Downloads
                      Video Support
                      Contact Us
                      Awards Voting Nominations Previous Winners
                      Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                      Resources
                      Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software