Design a simple JAX - WS (RPC) java web service

Savin Abeysooriya
2 min readJul 9, 2020

First of all let’s go quick introduction about web service and their important points.

Web service

The web service in simple term is a web service is a software system designed to support interoperable machine-to-machine interaction over a network.

Mainly there are two type of we service

01. SOAP web service SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services.

02. RESTful web service — REST stands for REpresentational State Transfer.REST is an architectural style not a protocol.

Java Web Service API

01. JAX-WS: for SOAP web services. The are two ways to write JAX-WS application code: by RPC style and Document style.

02. JAX-RS: for RESTful web services. There are mainly 2 implementation currently in use for creating JAX-RS application: Jersey and RESTeasy.

Here we gonna talk about JAX -WS is the java API for SOAP web service. JAX-RPC 1.1 was replaced by 2.0, which was renamed to JAX-WS. Following steps are to create simple hello world system using JAX — WS web service in eclips.

First we have to do is create dynamic web project with configuring Tomcat server. Then you have to create following 4 files.

01. HelloWorld.java

02. HellowWorldImpl.java

03. Publisher.java

04. HelloWorldClient.java

After run this application you can see the output as “ Hello World SE”

--

--