Java soap web services

SOAP web services:

SOAP stands for Simple Object Access Protocol. It is used to transfer the data. It is a XML-based messaging-layer protocol. SOAP can be used in combination with a variety of transport protocols like HTTP, SMTP, and JMS etc.

Note: SOAP is part of the set of standards specified by the W3C.

SOAP message structure:

Envelope: It is a mandatory element and used to define the start and the end of the message. Header: It is an optional element which provides the information on authentication, encoding of data, or how a recipient of a SOAP message should process the message. Body: It is a mandatory element and contains the XML data comprising the message being sent. Fault: It is an optional element which provides information about errors that occur while processing the message.

  jaxws-simpleClientAndService

Advantages:

1. Using SOAP over HTTP allows for easier communication through proxies and firewalls than previous remote execution technology. 2. SOAP is versatile enough to allow for the use of different transport protocols. The standard stacks use HTTP as a transport protocol, but other protocols are also usable e.g. SMTP and JMS. 3. SOAP is platform independent. 4. SOAP is language independent. 5. SOAP uses WSDL document which provides contract and technical details of the web services for client applications without exposing the underlying implementation technologies.

Disadvantages:

1. SOAP only supports XML and other lightweight formats like JSON are not supported. 2. SOAP is based on contract between client and server applications which results into tight coupling. 3. Client stub classes need to be generated again if there is any change in the server side contract. 4. SOAP services cannot be tested easily in browse. 5. Because of the verbose XML format, SOAP can be considerably slower than competing middleware technologies such as CORBA. 6. When relying on HTTP as a transport protocol and not using WS-Addressing or an ESB, the roles of the interacting parties are fixed. Only one party (the client) can use the services of the other. Developers must use polling instead of notification in these common cases. 7. Although SOAP is an open standard, not all languages offer appropriate support. Java, Curl, Delphi, PHP, .NET and Flex offer excellent SOAP integration and/or IDE support. Some Perl and Python support exists. 8. SOAP clients do not hold any stateful references to remote objects.  

Please follow and like us:
Content Protection by DMCA.com