20 Feb

Generating stubs from multiple WSDL files using Maven or Gradle

This tutorial may be useful when you want to generate stubs from multiple WSDL files using maven or gradle plugin.

Use below maven based plugin to generate stubs

Read More

17 Feb

Spring SOAP WebService Consumers using Gradle

Please read Spring SOAP WebService Producers using Gradle before continuing this tutorial.

This tutorial will show you how we can consume SOAP based webservice using Spring and Gradle. Please get the WSDl file from http://localhost:9999/ws/users.wsdl and you can save the downloaded file under src/main/resources/wsdl directory

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 : cxf

Read More

14 Feb

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.

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

Read More

13 Feb

Generating jaxb classes from xsd using Gradle

This tutorial will show you how to generate Jaxb classes from Xsd file using Gradle. Gradle does not have yet any ready-made plugin like Maven to generate so it involves writing an Ant Task.

Create Gradle project GradleXsdToJaxb in Eclipse Read More

11 Feb

Spring Boot WebSocket AngularJS Gradle Example

Introduction

WebSocket is a very thin, lightweight layer above TCP used to build interactive web applications that send messages back and forth between a browser and the server.

The best examples are live updates websites, where once user access the website neither user nor browser sends request to the server to get the latest updates. Server only keeps sending the messages to the browser.

For more information on WebSocket please read https://en.wikipedia.org/wiki/WebSocket

In this example, I am building a WebSocket application with Spring Boot using STOMP Messaging to provide automatic updates on the greeting message depending on the time of the day for every 3 secs. Read More

09 Feb

Spring Boot Liquibase Gradle Example

Introduction

It is often important to consider when developing web application, how to evolve the database schema of a Java web application.

Liquibase is an open source library for tracking, managing and applying database changes that can be used for any database. It helps you create the schema, run them during deployment and also help you write automated tests so that your changes will work in production.

Liquibase is a tool that reads a list of database changes from a changelog file. The changelog file is often XML-based, but it could be in other formats also, such as YAML, JSON and SQL formats. Once a new change is added to the changelog file, Liquibase will read the file, detect the new change, and apply it to the database. When code changes are committed to the version control system, the changelog file containing the database “version” also gets committed along with it.

For more information http://www.liquibase.org/

Read More

03 Feb

Spring Boot Activiti Example

Introduction

This example shows the simplicity of embedding Business Process Management (BPM) into our application using Activiti. We will build a spring boot application that embeds standards-based Business Process Modeling Notation (BPMN) logic into our application.

Activiti has advanced process design tools for embedding more sophisticated BPM logic into our application. These tools include an Eclipse-based and Web-Based BPMN Editor to name a few. Read More

26 Oct

Tomcat load balancing with Apache using mod proxy

Configuring Tomcat Load Balancing with Apache webserver (http server) using Mod Proxy is very simple. I have listed here the following steps on how to configure Apache with Tomcat to configure Load Balancer using Mod Proxy.

Having load-balanced is always recommended in production environment for better availability. Read More

10 Oct

Solving Josephus problem using Java

The Josephus problem (or Josephus permutation) is a theoretical problem related to a certain counting-out game.

People are standing in a circle waiting to be executed. Counting begins at a specified point in the circle and proceeds around the circle in a specified direction. After a specified number of people are skipped, the next person is executed. The procedure is repeated with the remaining people, starting with the next person, going in the same direction and skipping the same number of people, until only one person remains, and is freed.

For more information you can read https://en.wikipedia.org/wiki/Josephus_problem

Read More

Share