Types of Web Services
A service is a software component provided through a network-accessible endpoint.
The service consumer and provider use messages to exchange invocation request and response information in the
form of self-containing documents that make very few assumptions about the technological capabilities of the receiver.
Web services can be implemented in various ways.
The two types of web services "big"(SOAP) and "RESTful" web services.
JAX-WS provides the functionality for "big" web services
Big web services use XML messages that follow the Simple Object Access Protocol (SOAP) standard
it defining a message architecture and message formats, written in the Web Services Description Language (WSDL)
A SOAP-based design must include the following elements
WSDL can be used to describe the details of the contract, which may include messages, operations, bindings,
and the location of the web service. Also can process SOAP messages in a JAX-WS service without publishing a WSDL.
The architecture must address complex nonfunctional requirements. Many web service specifications address
such requirements and establish a common vocabulary for them.
"Big" Web Services
Examples include transactions, security, addressing, trust, coordination, and so on.
The architecture needs to handle asynchronous processing and invocation.
In such cases, the infrastructure provided by standards, such as Web Services Reliable Messaging (WSRM), and APIs,
such as JAX-WS, with their client-side asynchronous invocation support, can be leveraged.
RESTful Web service
JAX-RS provides the functionality for Representational State Transfer (RESTful) web services.
Suited for basic, ad hoc integration scenarios
Better integrated with HTTP
Project Jersey is the production-ready reference implementation for the JAX-RS specification
Use existing well-known W3C and Internet Engineering Task Force (IETF) standards (HTTP, XML, URI, MIME)
Lightweight infrastructure that allows services to be built with minimal tooling
RESTful web services is inexpensive
RESTful based design must include the following elements
The service producer and service consumer have a mutual understanding of the context and content being passed along.
Bandwidth is particularly important and needs to be limited.
Web service delivery or aggregation into existing websites can be enabled easily with a RESTful style.
and such toolkits as Direct Web Remoting (DWR) to consume the services in their web applications.
The web services are completely stateless.
A caching infrastructure can be leveraged for performance.