Overview of Web Services
In enterprise application development Java Web Services play an important role . A web service can be specify as a client and server application that communicates over HTTP, and provides a communication and interoperability between different applications.
There are different kinds of web service implementations available across each of the different programming platforms. Clients and servers transmit messages to exchange information between various web services.
The main web service implementations- the Java API for XML Web Services (JAX-WS) and the Java API for RESTful Web Services (JAX-RS). JAX-WS utilizes XML messages following the Simple Object Access Protocol i. e . SOAP.
SOAP is an XML language that defines messages. JAX-WS utilizes a Web Services Description Language (WSDL) file to describe each
of the various operations of a particular web service, and clients can use the WSDL file to obtain a proxy to the service.
JAX-RS is the Java API for Representational State Transfer (REST) web services and are useful for performing operations via HTTP without the need for a WSDL or XML messages.
REST services do not follow the SOAP standard. REST service implementations are stateless, and they provide a smaller footprint for bandwidth than SOAP services, making them ideal for HTTP on mobile devices. Services written in JAX-WS are helpful in enterprises where security is a necessity.
Although both SOAP and REST support SSL, JAX-WS provides WS-Security, which provides enterprise-related security. JAX-WSprovides a very formal transaction process over a service, whereas REST is limited by HTTP. In most cases, it is recommended to use REST services over JAX-WS when possible.
Q. What are Web Services?
A. Web services can be specify as a client and server applications that communicate over HTTP and provides an interoperability
and communication between applications that are running on a various platforms and frameworks. Web services are described by their great interoperability and extensibility.
Q. List the core Web Services technologies?
A. The core Web Services technologies are-
- XML (eXtensible Markup Language).
- SOAP (Simple Object Access Protocol).
- UDDI (Universal Description, Discovery, and Integration).
- WSDL (Web Services Description Language).
Q. Explain the types of Web Services ?
A. The web services can be implemented in many ways. The types of web services are “big” web services-“SOAP” and “RESTful” web services.
“Big”Web Services– “SOAP”
The functionality for “big” web services-“SOAP” is provided by the JAX-WS web services and use XML messages that follow the Simple Object Access Protocol i. e. SOAP standard, an XML language defining a message architecture with its formats. This type of systems
contain a machine-readable description , written in the Web Services Description Language (WSDL), an XML language for defining interfaces.
RESTful Web Services
The functionality for Representational State Transfer i.e.
RESTful web services is provided by the JAX-RS provides. REST is suited well for fundamental, adhoc integration synopsis.
RESTful web services, integrated better with HTTP than SOAP-based services.
As RESTful web services use existing well-known W3C and Internet Engineering Task Force (IETF) standards (HTTP, XML, URI, MIME) and have a lightweight infrastructure using a development tool such as NetBeans IDE to further reduce the complexity of developing RESTful web services.