Introduction
SOAP and REST are the two types of web services offered over the internet. Java’s very own APIs are used to create both these services. JAX-WS is one such API which stands for Java API for XML Web Services. It is an XML-based Java API to build web services for client-server applications. They come as part of the JDK installation and extensively use annotations.

“Recommended Topic, procedure call in compiler design“
JAX-WS
JAX-WS is a framework that simplifies the creation and use of SOAP APIs. It is a programming model for application development that uses annotations thoroughly. Web services are called both synchronously and asynchronously with JAX-WS. It supports a polling and callback mechanism for asynchronous calls to web services. In the polling model, a client can issue a request and get a response back. This is polled to determine if the server has responded to the client's request and to retrieve the actual response. In the callback model, the client provides a callback handler to receive and process the response object. Both models enable a client to focus on process work without waiting for a response. JAX-WS web services can be created by using either a WSDL file or an implementation bean class as a start.

RPC web service
RPC or Remote Procedure Call is used to construct distributed, client-server-based applications. One procedure calls another procedure, both existing in different address spaces. JAX-WS RCP can invoke a Java-based Web service with a known description and a consistent WSDL description. The SOAP messages body contains an XML representation of the method’s call. The method name and parameters construct an XML tree representing the method’s call stack.
Document style web service
The Document style web service is also referred to as the Message-Oriented style. The SOAP message body contains an XML document that can be validated against a predefined XML schema. Since the protocol relies on the predefined schema to determine the structure of the SOAP message, it is customisable and flexible.





