jws

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 »

JAX-WS Web Service Example

In this example we shall learn implementing JAX-WS Web Service. JAX-WS are the API’s provided by Java for implementing Web Service. Here, we shall start by learning what web services are, their architecture, followed by implementation of server and client. We shall also learn the different variants of XML Web Service and the WSDL file which is the contract that ...

Read More »

JAX-WS Client Example

Hosting a web service is of no use until it becomes usable by a client. In this example we shall learn how to write JAX-WS client for a SOAP web service. Writing JAX-WS Client is easy. But we shall start our example by first creating a web service and then writing a client for the same. 1. Writing server for ...

Read More »

JAX-WS Security Example

In this example we shall learn, how to implement JAX-WS security to SOAP web services. Security is always critical to web services. When talking about web services security here, following security issues are considered: Wire-level security Assurance between client and web service that they are the only one communicating. Data encryption. Assurance that received message is same as sent message. ...

Read More »

JAX-WS Annotations Example

In this example we shall learn some important JAX-WS annotations provided by Java. To understand this tutorial, following is the prerequisite knowledge required: Basic knowledge of how to use annotations Basic SOAP Architecture Table Of Contents 1. JAX-WS annotations 1.1 @WebService 1.2 @SoapBinding 1.3 @WebMethod 1.4 @WebResult 1.5 @WebServiceClient 1.6 @RequestWrapper 1.7 @ResponseWrapper 1.8 @Oneway 1.9 @HandlerChain 2. Directory structure ...

Read More »

JAX-WS Endpoint Example

In this example we shall see how to use JAX-WS Endpoint. Literally talking about web service endpoint, it is a resource that is to be referred and to which web service message should be addressed. This endpoint can either be in published or unpublished state and JAX-WS’s Endpoint class is used to achieve this purpose. Endpoint class has 2 important methods ...

Read More »

JAX-WS Spring Integration Example

This is an example that demonstrates how you to use JAX-WS to create a simple Web Service and use Spring Framework to perform Dependency Injection with a bean. There are three ways of exposing Spring POJO services as a JAX–WS web services : Exposing Servlet – based web services (suitable for Java EE 5 environments) Exporting standalone web services (suitable when utilizing Sun’s JDK 1.6 build–inJAX–WS provider) Exporting ...

Read More »

Container Authentication With JAX-WS

In this example we shall see how to create a Web Service that requires container authentication with JAX-WS using Tomcat. We have already seen how to perform authentication in the application level in Application Authentication With JAX-WS tutorial. The main deference in this is that the client has to authenticate himself to the server, not the application. Thus the authentication is declerative. ...

Read More »

Application Authentication With JAX-WS

In this example we are going to see how to implement a simple application level authentication in JAX-WS. The notion of authentication is very well covered and its necessity is quite clear. In our tutorial we are going to authenticate a client to the endpoint server. The idea is straight forward. The client who wants to consume the Web Service, ...

Read More »

JAX-WS Web Services On Tomcat

In this tutorial we are going to see how to deploy JAX-WS Web Services on Tomcat. For this tutorial we are going to use Eclipse Eclipse 4.3 Kepler, which will also help us to construct the necessary WAR file for the Web Application. In order to deploy a Web Service on Tomcat one should follow these steps: Frist of all ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns