Check a given date is first day of month using Joda API

Introduction In this post, I will show you how to check whether a given date is first day of the month using Joda API. Joda API is a date time API which provides useful methods for data and time management in Java applications.

Contract First SOAP Web Service

Introduction This tutorial will show you how we can create and publish SOAP based webservice in Contract-first approach using Apache cxf, Spring and Maven. There are mainly two approaches to create the Webservice – Contract-first & Contract-last. The Contract-first approach tells us to create first WSDL and then create end-point interface and implementation class. The Contract-last approach tells us to…

Junit’s annotation based expected exception testing

Junit provides an option of tracing exception thrown by a Java method. There are different ways of handling exceptions in JUnit tests. Standard Junit’s org.junit.Test annotation offers expected attribute that allows you specifying the a Throwable to cause a test method to succeed if an exception of the specified class is thrown by the method. A Java unit test should…

Create archive or zip using Java

With this example I will show you how to create an archive or zip from multiple files using Java language. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you here how to create a maven project in Eclipse.

Generic Way of Writing Data to Multiple Sheets in Excel using Apache POI

Introduction With this example I will show you how to create an excel file and write a list of objects to multiple sheets in excel file using Apache POI in Java language. In this file I am going to show generic way of writing data to multiple sheets in excel using Apache POI and Java. In this example I am…

Generic Way Of Writing Data In Excel Using Apache POI

Writing To Excel Sheet The example is about generic way of writing data in excel using apache poi library in Java programming language. With this example I will show you how to create an excel file and write any kind of objects using Java’s reflection API to excel file with the help of Apache POI. In this example I am…

Consume Apache CXF, Spring based SOAP Webservice

This tutorial will show you how you can consume SOAP based webservice which is built using Apache cxf, Spring. This is client side application and it consumes the service which I build earlier. The server side application is here at https://roytuts.com/create-soap-webservice-using-apache-cxf-spring/ I am using gradle and maven as build tools for this application.

Create SOAP Webservice using Apache CXF, Spring

In this tutorial I will show you how you can publish SOAP based web service using Apache cxf, Spring. I am going to use Spring Boot framework to create this SOAP service application. I am using both gradle and maven as build tools. SOAP stands for Simple Object Access Protocol that works on various protocol and supports only XML structure…

Immediate attribute example in JSF

Introduction This tutorial will show you what is the purpose of using immeditae attribute in JSF. Although the request processing lifecycle processes the different phases in a consistent manner, the execution order of the phases can be altered for special cases. For example, you may want to add a Cancel button to a form. When clicked, it will skip all…

Mule on Tomcat

In this post I will show you how it is possible to deploy Mule on a web container such as Tomcat because running Mule as a standalone service is often the more popular and recommended approach. Both standalone and web based mule applications have their benefits and drawbacks but which one to use is mainly dependent on the project requirements…