Saturday, 16 April 2016

SOAP Web Service Interview Question



1.       Web Services:
  • It is an application component which is access from the web.
  • It can be publish, found and used on the web.
2.       Web Services Features:
  • Platform independent and language independent
  • It is used to communicate between two different applications
  • It is used standardized xml based messaging system
  • Provide Interoperability
3.       Web Services Components:
  • SOAP – Simple Object Access Protocol
  • WSDL – Web Service Description Language
  • UDDI – Universal Description, Discovery and Integration
4.       Purpose of XML in WS:
  • Exchange the data between two different applications
  • WS takes help from XML to tag the data, format the data
5.       Purpose of SOAP in WS:
  • It is XML based protocol for accessing the web services.
  • It is W3C recommendation for communication between applications
  • Platform Independent and language independent
6.       Purpose of WSDL in WS: 
  • It is used for describe the Web Services like method name, parameters and how to access it
  • It is XML document containing information about web services
  • WSDL is a part of UDDI, it act as interface between WS application
7.       Purpose of UDDI in WS:
  • It is xml based framework for describing, discovering and integrating WS
  • UDDI is directory of WS interface described by WSDL 
8.       Benefits of Web Services:
  • Exposing the existing functionality on the web
  • Interoperability
  • Platform Independent and Language Independent
  • Use XML for data exchange or messaging
  • Reusability and Modularity 
9.       What do you mean by Interoperability of Web Services?

Two different type of application like one application is developed in JAVA and another application is developed in PHP so these two application can exchange their data to each other via web service, which is call interoperability.

10.   Do Web services supports Remote Procedure Calls?

YES. SOAP web service can be implement using two ways.
  • RPC Style
  • Document Style
11.   Behavioural characteristics of Web Services?           
  • XML Based
  • Loosely coupled
  • Support RPC and Document Style
  • Ability to Synchronous and Asynchronous
12.   What is Synchronicity?

Client has to be wait till server response back.

13.   What is Asynchronous?

Asynchronous operations allow a client to invoke a service and then execute other functions.

14.   Core roles of Web Services Architecture?
  • Service Provider
  • Service Registry
  • Service Requestor
15.   What is the purpose of service registry in Web Service Architecture?

It is logically centralized directory of services. It provides the centralized place where developer can publish and find the web service.

16.   What are the core layers in Web Service Protocol Stack?

There are four core layers:
  • Service Discovery (UDDI): It is responsible to manage the directory of WS, where it can be publish, find and access.
  • Servicer Description (WSDL): It is responsible to describe the information about web service
  • Service Transport (HTTP, SMTP, FTP, and BEEP): It is responsible to transforming the message between two applications.
  • XML Messaging (SAOP): It is responsible for encoding the message in XML format so both application can understand the messaging format.
17.    What are the primary security issues with web services?
  • Confidentiality
  • Authentication and Authorization
  • Network Security
18.   If client send the SOAP request to service, Can we ensure that the communication remain confidential?

Yes, SOAP message run on top of HTTP. HTTP supports the SSL (Secure Socket Layers) so communication can be encrypted via SSL.

19.   If client connect to WS, How do we identify the user? Is user authorized to use the WS?

There are many ways to do authentication and authorization, but mainly two which I remember right now.
  • HTTP gives in-build support – basic and digest authentication
  • SOAP digital signature – authorized by two parties (client and server)
20.   Advantage and disadvantage of SOAP Web service?

Advantage:
                      WS Security
                      Platform and Language Independent
Disadvantage
                      Slow
                      Strictly flow to standard to create SOAP WS
                      WSDL dependent

21.   What is SOA?

It is service oriented architecture. It is design pattern to provide services to another application through protocol. It is just concept only, not tied to any programming language.

22.   What tools are used to test the web service?
  • SOAP Client
  • Chrome postman
  • Firefox poster
23.   Difference between SOAP and REST Web service?

SOAP
REST
It is a protocol
It is architectural style
Simple Object Access Protocol
Representational State Transfer
It is slow because of  XML parsing is require
It is fast than SOAP
It consume more bandwidth and resource than REST
It consume less bandwidth and resource than SOAP
Data Format – XML only
Data format – XML, Plain Text, HTTP, XSL, JSON and more
SOAP cannot use REST
REST can use SOAP
SOAP uses services interfaces to expose the business logic.
REST uses the URI to expose the Business Logic
JAVA API – JAXA-WS
JAVA API – JAX-RS
Define own security – WS Security
Inherits security measures from the underlying transport.

24.   How do you define web service protocol stack?

There are various set of protocol that can be used to explore and execute the web service and entire stack is divided into four layer
  • Service transport Layer: This Layer is used to transfer messages between different applications, such as HTTP, SMTP, FTP, and BEEP (Blocks Extensible Exchange Protocol).
  • XML messaging Layer: This Layer is used to encodes messages in XML format so that messages can be understood at each end, such as XML-RPC and SOAP
  • Service Description Layer: This Layer is used to describes the user interface to a web service, such as WSDL
  • Service Discovery: This Layer is used to centralize services to a common registry and offer simple publish functionality, such as UDDI.

No comments:

Post a Comment