By Alx: June 2019

Soap with Spring boot - WSDL First

Goal

In this tutorial we want to show how to build a saop web serivce with spring boot. Spring boot uses Spring-WS, which allows only contract-first. Hence we need to start from a contract definition, either from a xml schema (xsd) or from WSDL. We will flow the contract-first with wsdl approach

Used technologies

JDK 1.8
Maven 3.2

WSDL First


The wsdl document contains the five standard elements: types, message, portType, binding and service.
The wsdl provides 3 operations: deleteTutorial, updateTutorial and getTutorials

Maven file

The only used dependency isspring-boot-starter-web-services, it includes the needed dependencies for using Spring-WS
Maven plugin maven-jaxb2-plugin for generating Java sources from WSDL



Let's generate code


wsdl to code

Implementing the endpoint

A simple implemenation with dummy data

Configuration

Notes:



Run the SOAP Web Service

Test with soapUI

soapUI wsdl

References