Docker Compose – Dockerizing Nodejs MySQL REST API CRUD Example

Introduction In this tutorial I am going to explain you how to use docker compose to dockerize your Nodejs MySQL REST API for CRUD operations. I am not going to tell you here how to build the REST CRUD application but you can always go back and check the detail tutorial on this here. I am only going to show you how to dockerize your app using docker compose in Linux environment. It is a best practice for a container to have only one process with single responsibility. But as…

Continue

How to create and consume SOAP web service using SoapServer and SoapClient in PHP

In this tutorial I am going to show you how to create SOAP web service using SoapServer and how to consume web service using SoapClient in PHP. I am going to create a WSDL or web service definition language file for defining the contract between the server and client. SoapServer is used to create server side implementation of the SOAP service, whereas SoapClient is to used to consume the SOAP service.

Continue

3 ways to consume SOAP web service in PHP

Here I am going to show you how to consume SOAP web service in PHP in 3 ways. To consume SOAP webservice you must have a SOAP web service deployed onto a server. Here I am going to consume or call the SOAP service which is ready made available on the internet. I am calling the CelsiusToFahrenheit which converts temperature from celsius to fahrenheit. You may also create your own service and write a SOAP client to consume the service. The method of consumption is similar to what I am…

Continue

PHP SOAP Web Service Configuration

Here I am going to tell you how to configure PHP SOAP web service. Obviously you can imagine why I am going to show you PHP SOAP configuration. This is required when you are going to create or consume the SOAP web service from your PHP programs. SOAP is an acronym that stands for Simple Object Access Protocol. It is XML based messaging protocol that defines the semantic of the communication structure between two applications. It is both platform and language independent. It supports various protocols while communicating to different…

Continue

How to use Swagger with Python based Django REST APIs

Here in this tutorial I am going to show you how to use Swagger API with Django REST framework. Swagger API provides well structured documentation for REST API endpoints so a new person can say how to test a REST API without knowing its internal implementation. Essentially, Swagger does a simple but very powerful thing: with a bit of additional annotations it generates the REST API descriptions such as HTTP methods, path / query / form parameters, responses, HTTP error codes etc) and even provides a simple web UI to…

Continue

REST API – HTTP GET with Request Body

Here we are going to discuss about whether it is a good idea to send parameter in request body of the HTTP GET request or not. We will also discuss about idempotent and safe methods. When you are doing a GET request on entity, you are actually requesting the content of the entity. If you want to add some parameters (for example sorting a list in ascending or descending order), you can add these parameters in the query string. Alternatively you may also want to specify these parameters in the…

Continue

How to consume JAX WS SOAP Web Service that requires authentication using Python

Introduction In this tutorial we will see how to consume or call JAX WS based SOAP web service that requires authentication. We will use Python program to consume the SOAP service. In my other example I had shown how to call SOAP webservice using Python but that service did not require any authentication. We are going to use my existing JAX WS based SOAP service which I previously created using Java programming language. As the web service is language agnostic so we can build or consume the service using different…

Continue

How to consume SOAP web service using Python

Introduction In this example we will see how to consume SOAP web service using Python. In this example mainly I will show you how to call POST request with XML or JSON as a request in the body. We will use here Python package xml.dom.minidom to create the XML request in the body. We will create HTTPS connection over the SOAP webservice. We are not going to build any SOAP service in this example, rather we will use existing SOAP service from w3schools where there is already ready made SOAP…

Continue

File Upload and File Download REST APIs Testing using Rest Assured in Java

Introduction In this tutorial we will test REST APIs used for file upload and file download. The file upload or download application might have been created using any server side technology. We are going to use here Rest Assured library with Junit 5 framework in Java programming language. We will use multipart for file upload test. For download test you don’t need such content type – multipart. The fluent API used by REST Assured supports the familiar Given/When/Then syntax from behavior driven development (BDD) framework, resulting in a test that is easy…

Continue

How to perform CRUD operations REST API testing using Rest Assured in Java

Introduction In this example we will see how to perform CRUD operations REST API testing using Rest Assured library in Java programming language. Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain. This tutorial will show you how to test REST APIs which perform CRUD (Create, Read, Update and Delete) operations. So we will perform testing on HTTP methods GET, POST, PUT and DELETE. REST Assured can be…

Continue