Types of Web Services
There are two types of Web Services :
1. JAX-WS (SOAP) : JAX-WS is the Java API for SOAP Web Service.
2. JAX-RS (RestFull) : JAX-RS is the Java API for RestFull Web Service.
1. JAX-WS (SOAP) :
• JAX-WS is the Java API for SOAP Web Service.
• JAX-WS provides the functionality for "big" web services.
• "Big" Web Services use XML messages that follows the Simple Object Access Protocol (SOAP) Standard.
• XML Language defines a Message Architecture and Message Format.
• Such system often contain a Machine Readable Description of the operations offered by the Web Services written in the Web Service Description.
Types of JAX-WS (SOAP) :
• RPC Style • Document Style
JAX-WS RPC Style :
When you develop JAX-WS RPC, you require an API that API is already build in jdk. So you no need to load an extra JAR (Java Archieve).
• JAX-WS RPC Style use Method name and parameter to generate XML.
• It is very difficult to validate.
• Tight Coupling
JAX-WS Document Style :
• Document Style can be validate against predefined Schema.
• Loose Coupling
• Document SOAP messages send as single document.
2. JAX-RS (RestFull) :
• RestFull provides the functionality for Representational State Transfer Web Service.
• RestFull is an Architectural Style not a protocol. • RestFull is a well-suited for Basics.
• It involves Adhoc Network Integration Scenario.
• It offers better integrity with HTTP than SOAP Web Services.
• It do not require XML messages or WSDL services, API definition.
Types of JAX-RS (RestFull) :
• Jersey/Project-Jersey • RestEasy
JAX-RS Project-Jersey :
• Project-Jersey is the Production Ready Reference implementation for JAX-RS Specification.
• Jersey implements support for the Annotation defined in the JAX-RS that makes it easy for the developer to develop the RestFull because RestFull Web Service uses existing well known W3C and Internet Engineering Task Force (IETF).
JAX-RS RestEasy :