Skip to main content


Showing posts from 2020

Spring boot retry tutorial

Spring Retry API Spring provides spring-retry API for running business logic with retry options and recovery method or operations. In this tutorial we will learn the usage of all these with example. We are using Spring boot application here for our example code.
Maven dependencies To use spring retry we need below dependencies.
spring-retry This API provides many annotations which we can use in a declarative manner to implement the same.
<dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> <version>1.2.5.RELEASE</version> </dependency> spring-boot-starter-aop Spring AOP is also required for retry implementation.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> Retry implementation To implement retry w…

XML Validation using XSD schema

We are going to validate XML using XSD schema in Java. We will create XML Schema using XSD and then use same schema to create the XML file. Then we will write our code to validate this XML against same schema.
XSD Schema creation Below is our schema where we are defining the Schema for XML elements. In this schema we creating two elements, one for request and another for response. We are publishing this schema using targetNamespace which we will use during XML creation.
<xs:schema xmlns:xs="" xmlns:tns="" targetNamespace="" elementFormDefault="qualified"> <xs:element name="sayHelloRequest"> <xs:complexType> <xs:sequence> <xs:element name="userName" type="xs:string"/> </xs:sequence> </xs:compl…

Setting up ReactJS for development and deployment

In this tutorial we will learn how to create a react application.
Softwares required for ReactJS We need to install below softwares for react development.
Visual studio code This software is free and can be downloaded from
Once downloaded, extract the zip  and place the binary under "Applications" and allow app access from System Preferences -> Security & privacy.
Node.JS and NPM Node.JS provides a java script enabled environment to run on a web server. It eases our development for UI based applications. NPM is a package manager which installs along with Node.jS and helpful in installing packages and libraries.
Install Node.JS and NPM using brew.
brew install node Check version of Node and NPM using below command.
node -v npm -v Create React application To create react application we will first install the required package and latter will use it to create our ReactJS application.
Install create-react-app package Execute below co…

Soap over JMS with Spring boot, CXF and Active MQ

Soap over JMS comes with several benefits like, asynchronous processing, one time delivery, assured delivery. This paradigm is mainly used internally in an organization (service providers and clients).
In this tutorial we are going to use Spring boot and Apache CXF to develop a Soap service and then use Active MQ to make it work as "Soap Over JMS".
Creating Soap service using Spring boot and Apache CXF It is very easy to develop a Soap service with Spring boot. We will follow contract first approach to develop the service. We will create a XML schema & use jaxb2 plugin to generate necessary schema classes and then implement the service using them. Please refer below post where it explains in detail, how to develop a Soap service using Spring boot and CXF.
Implementing Soap over JMS To implement the Soap over JMS we need to integrate JMS with soap service where our service listens to a reque…

SOAP service development using Spring boot and Apache CXF

In this tutorial we are going to learn how to develop a SOAP web service using Spring boot and Apache CXF. We will follow the contract first approach to develop our service where we will use jaxb2 maven plugin to generate the java classes which we will use for service implementation.
Why contract first With contract first our primary focus stays with the contract of service to be implemented. Also it is useful to match the input/output with business requirement. We can share the contract with other business units/ customers or users, so it helps them to start early without waiting for the complete implementation. Once our contract is ready we can generate the Java classes using jaxb plugin which generates the java objects using the schema for SOAP contract and we need to focus only on service implementation.
SOAP service development (Hello service) This service will have one operation where user can send their name and in response they will get a hello message with the passed name.