SOAP (Simple Object Access Protocol)


Introduction :

• SOAP is XML based protocol for accessing Web Services.
• SOAP is a W3C recommendation for communication between two applications.
  W3C : World Wide Web Consortieum.
• SOAP is a XML based so it is platform independent and language independent.
  In other words, it can be used with java, php, .net etc.

JAX-WS
• 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.

Advantages of SOAP Web Service :
1. Web Service (WS) Security : SOAP define it's own security known as Web Service Security.
2. Language independent and platform independent.

Disadvantages of SOAP Web Service :
1. Very slow
2. WSDL Dependent
3. SOAP can not use RestFull in it.