Home » Enterprise Java » jws (page 3)

jws

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 »

JAX-WS SOAP Handler Example

In this example we are going to see how to Use SOAP Handler to intercept SOAP messages form the client – server communication. A SOAP handler can also change the SOAP messages from/to client/server. In this example we are going to create a Handler in the Client Side that will add a header to the SOAP message containing a random ...

Read More »

JAX-WS Attachment With MTOM

In this tutorial we are going to see how to use JAX-WS along with Message Transmission Optimization Mechanism (MTOM) in order to transfer images from a Web Service endpoint to a Client and vise versa. So, in this example we are going to create a Web Service that a client can use in order to download or upload an image. As we know, ...

Read More »

JAX-WS Hello World Example – Document Style

In this example we are going to see how to create, deploy and consume Web Services using JAX-WS. JAX-WS is a fine tool for creating Web Services and it’s included in the JDK since JDK 1.6. You are going to see how easy it is to create and deploy Web Services using Document Style. What you need to run this ...

Read More »