Spring Web Services

Exercise: Todo SOAP Client

The objective of this exercise is to implement a SOAP-based client of the todo web service.

Assignment

  1. Preparation
    • Remove the service artifacts from the todo application
    • Add the org.apache.cxf:cxf-rt-frontend-jaxws and org.apache.cxf:cxf-rt-transports-http dependencies to the Maven project
  2. Code generation (see Apache CXF documentation)
    • Use the Maven plugin cxf-codegen-plugin to generate the Java artifacts from the WSDL document
  3. Client implementation
    • Implement the configuration class WebClientConfig with a bean method that returns a proxy of the web service
    • Use the DateMapper utility class to convert the occurring date types where necessary
    • Use an application property to specify the endpoint address of the todo web service

Solution