Home » Tag Archives: web services

Tag Archives: web services

JAX-WS Hibernate Example

In this example, we feature a comprehensive article on JAX-WS Hibernate. We will demonstrate how to create a SOAP-based web service that uses Hibernate to read data from a database. 1. Introduction Java API for XML Web Services (JAX-WS) is a technology for developing SOAP-based web services and clients. The API includes annotations for defining web service endpoints, service implementation beans, ...

Read More »

Differences Between REST and SOAP APIs

This article discusses the differences between REST and Soap APIs. Therefore, after reading these articles, readers will probably understand why, when and how any of these two APIs are used to develop these APIs. The commonest and most popular keyword is Web Services in the area of Web Development. Herein, we first try to understand what web services are, move ...

Read More »

JAX-WS Change Endpoint Example

In this example, we will demonstrate how to change the service endpoint in a Java web service client application. 1. Introduction A web service (which is described in a WSDL file) can have one or more endpoints.  A web service endpoint is a URL used to locate and access a web service.  The endpoint is derived from the port and ...

Read More »

JAX-WS Gradle Example

In this post, we will demonstrate how to build a JAX-WS web service using Gradle. 1. Introduction Java API for XML Web Services (JAX-WS) uses XML files for configuring services and for exchanging data. JAX-WS is commonly used for SOAP-based messaging. It uses Java API for XML Binding (JAXB) to marshal and unmarshal Java objects to XML and the reverse. Gradle ...

Read More »

JAX-WS Dependencies Example

In this post, we present a JAX-WS web services example using Maven dependency configuration. 1. Introduction Java API for XML Web Services (JAX-WS) uses XML files for configuring services and for exchanging data. JAX-WS is generally used for SOAP-based messaging. It relies on Java API for XML Binding (JAXB) to marshal and unmarshal Java objects to XML documents and the reverse. You ...

Read More »

Jax-Ws vs Jax-Rpc: Comparison and Differences

In this article, we will compare the JAX-WS and JAX-RPC programming APIs with respect to the Java programming model. Note: This article is for academic purposes only. JAX-RPC is obsolete and its use is discouraged for any new Java development projects. 1. Introduction The Web Services Architecture evolved in part to address interoperability between disparate and heterogeneous systems. SOAP (Simple ...

Read More »

Jax-Ws LogicalHandler Example

In this example, we will show you how to implement a JAX-WS Logical Handler. 1. Introduction When you send a request to a web service, the SOAP message may require verification. The SOAP message response may also require verification. For these requirements, you can use a SOAP message handler to intercept the SOAP message for further processing. SOAP message handlers ...

Read More »

Jax-Ws AsyncHandler Example

In this example, we will show you how to implement an asynchronous SOAP web service and client using the AsyncHandler callback handler. 1. Introduction There are two ways to invoke a web service, synchronously and asynchronously. When invoking a web service synchronously, the client must wait for the response before resuming its work. When invoking a web service asynchronously, the ...

Read More »

Jax-Ws Attachment Example

In this example, we will show you how to exchange files with a SOAP web service using attachments. 1. Introduction You may need to send or receive binary data, such as an image file or a PDF file, in a SOAP message. If the binary data is large, it would be inefficient to send it as part of a typical ...

Read More »

JAX-WS Client Basic Authentication Example

1. Introduction In this example, we will demonstrate how to add basic authentication to a JAX-WS web service and client. But before we begin, let’s get some background. Table Of Contents 1. Introduction 1.1 SOA 1.2 Web Services 1.3 JAX-WS 1.4 Apache CXF 1.5 WS-Security 1.6 UsernameToken Profile 1.7 Tools Used in this Example 2. JAX-WS Basic Authentication Example 2.1 ...

Read More »