Spring SOAP WebService Producers using Gradle

This tutorial will show you how we can create and publish SOAP based webservice in Contract-first approach using Spring and Gradle. There are mainly two approaches to create the Webservice – Contract-first & Contract-last. The Contract-first approach tells us to create first XSD/WSDL and then create end-point interface and implementation class. The Contract-last approach tells us to create first end-point interface and implementation class then create WSDL file. This example will show you mainly Spring SOAP Webservice Producers using Gradle, i.e., it will only publish or deploy the web service into the server.

Prerequisites

Java at least version 8 needs to be installed and configured
Gradle plugin needs to be installed into Eclipse
Gradle 4.x needs to installed and configured
Dependencies : Spring boot, wsdl

Continue reading “Spring SOAP WebService Producers using Gradle”

Generating jaxb classes from xsd using Gradle

This tutorial will show you how to generate Jaxb classes from Xsd file using Gradle. Generating jaxb classes from xsd using Gradle is not an easy task because Gradle does not have yet any ready-made plugin like Maven. So to generate java classes from xsd schema using Gradle we have to write an an Ant Task. The below example will show you how to do it.

Prerequisites

Eclipse

JDK 8 or 9

Have Gradle installed and configured

Required dependencies in Gradle’s build file

Now follow the below steps in order to complete the example.

Create Gradle project GradleXsdToJaxb in Eclipse Continue reading “Generating jaxb classes from xsd using Gradle”