SOAP Flashcards
What is SOAP?
SOAP stands for Simple Object Access Protocol. SOAP is an XML based industry standard protocol for designing and developing web services. Since it’s XML based, it’s platform and language independent. So our server can be based on JAVA and client can be on .NET, PHP etc. and vice versa.
What are advantages of SOAP Web Services?
SOAP web services have all the advantages that web services has, some of the additional advantages are:
WSDL document provides contract and technical details of the web services for client applications without exposing the underlying implementation technologies.
SOAP uses XML data for payload as well as contract, so it can be easily read by any technology.
SOAP protocol is universally accepted, so it’s an industry standard approach with many easily available open source implementations.
What are disadvantages of SOAP Web Services?
Some of the disadvantages of SOAP protocol are:
Only XML can be used, JSON and other lightweight formats are not supported.
SOAP is based on the contract, so there is a tight coupling between client and server applications.
SOAP is slow because payload is large for a simple string message, since it uses XML format.
Anytime there is change in the server side contract, client stub classes need to be generated again.
Can’t be tested easily in browser
What is WSDL?
WSDL stands for Web Service Description Language.
WSDL is an XML based document that provides technical details about the web service. Some of the useful information in WSDL document are: method name, port types, service end point, binding, method parameters etc.
What are different components of WSDL?
Some of the different tags in WSDL xml are:
xsd: import namespace and schemaLocation: provides WSDL URL and unique namespace for web service.
message: for method arguments
part: for method argument name and type
portType: service name, there can be multiple services in a wsdl document.
operation: contains method name
soap: address for endpoint URL.
What is UDDI?
UDDI is acronym for Universal Description, Discovery and Integration.
UDDI is a directory of web services where client applications can lookup for web services. Web Services can register to the UDDI server and make them available to client applications.
What is difference between Top Down and Bottom Up approach in SOAP Web Services?
In Top Down approach first WSDL document is created to establish the contract between web service and client and then code is written, it’s also termed as contract first approach. This is hard to implement because classes need to be written to confirm the contract established in WSDL. Benefit of this approach is that both client and server code can be written in parallel.
In Bottom Up approach, first web service code is written and then WSDL is generated. It’s also termed as contract last approach. This approach is easy to implement because WSDL is generated based on code. In this approach client code have to wait for WSDL from server side to start their work.
Name a framework in Java to implement SOAP web services?
We can create SOAP web services using JAX-WS API.. Note that they are not implementations of JAX-WS API, they are totally different framework that work on Servlet model to expose your business logic classes as SOAP web services
What is the difference between RPC Style and Document Style SOAP web Services?
RPC style generate WSDL document based on the method name and it’s parameters. No type definitions are present in WSDL document.
How to get WSDL file of a SOAP web service?
WSDL document can be accessed by appending ?wsdl to the SOAP endoint URL.
http://localhost:8888/testWS?wsdl