Web Services Interview Questions and Answers

What is Web service ?
A Web service is a software system identified by a URI, whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML based messages conveyed by Internet protocols.
Loosely coupled, reusable software components that semantically encapsulate discrete functionality and are distributed and programmatically accessible over standard Internet protocols.

What are the Advantages of Web service ?

  • Not based on a programming language: Java, .Net, C, C++, Python, Perl, …
  • Not based on a programming data model: Objects vs non-objects environments.
  • Convergence of SOA (Service-Oriented Architecture) and Web.
  • Based on web technologies
  • Do not need huge framework of memory
  • Basic usage is b-to-b ,remote controlled devices,internal external appl communications

What are the Web Services Components ?

  1. XML – eXtensible Markup Language – A uniform data representation and exchange mechanism.
  2. SOAP – Simple Object Access Protocol – A standard way for communication.
  3. UDDI – Universal Description, Discovery and Integration specification – A mechanism to register and locate WS based application.
  4. WSDL – Web Services Description Language – A standard meta language to described the services offered. 

What kind of Data Transport is possible using Web service ?
Data format :
    XML (subset of XML 1.0), URL encoding.
    Data format schema definition: XML Schema
Wire format :
    XML Protocol (XML-RPC, SOAP), URI
    Transfer protocol: HTTP, SMTP, JMS, BEEP, …

What is SOAP ?

  • SOAP is a lightweight protocol for exchange of information in a decentralised, distributed environment
  • Web Services expose useful functionality to Web users through a standard Web protocol called SOAP.
  • Soap is an XML vocabulary standard to enable programs on separate computers to interact across any network. SOAP is a simple markup language for describing messages between applications.
  • Soap uses mainly HTTP as a transport protocol. That is, HTTP message contains a SOAP message as its payload section.

What is  JAX-RPC ?

  1. JAX-RPC hides this complexity from the application developer.
  2. On the server side, the developer specifies the remote procedures by defining methods in an interface.
  3. The developer also codes one or more classes that implement those methods.
  4. Client programs create a proxy, a local object representing the service, and then simply invokes methods on the proxy

What are the Benefits  of JAX-RPC ?

  • Portable and interoperable web services
  • Ease of development of web services endpoints & clients
  • Increased developer productivity
  • Support for open standards: XML, SOAP, WSDL
  • Standard API developed under Java Community Process
  • Support for tools
  • RPC programming model with support for attachments
  • Support for SOAP message processing model & extensions
  • Secure web services
  • Extensible type mapping

Explain the Web Service Model?
The Web Services architecture is based upon the interactions between three roles:

  • Service provider
  • Service registry
  • Service requestor
  • The interactions involve the:
  • Publish operations
  • Find operation
  • Bind operations.

What is WSDL ?

  • WSDL stands for Web Services Description Language.
  • WSDL is an XML vocabulary for describing Web services. It allows developers to describe Web Services and their capabilities, in a standard manner.
  • WSDL specifies what a request message must contain and what the response message will look like in unambiguous notation. In other words, it is a contract between the XML Web service and the client who wishes to use this service.
  • In addition to describing message contents, WSDL defines where the service is available and what communications protocol is used to talk to the service.

Can you explain WSDL Document Structure ?

  1. A WSDL document is just a simple XML document.
  2. It defines a web service using these major elements:
  3. port type: The operations performed by the web service.
  4. message: The messages used by the web service.
  5. types: The data types used by the web service.
  6. binding: The communication protocols used by the web service.    

What is WSDL Ports ?
  1. The <portType> element is the most important WSDL element.
  2. It defines a web service, the operations that can be performed, and the messages that are involved.
  3. The <portType> element can be compared to a function library (or a module, or a class) in a traditional programming language.

What types of Operations available in WSDL ?

  • One-way : The operation can receive a message but will not return a response
  • Request-response: The operation can receive a request and will return a response
  • Solicit-response: The operation can send a request and will wait for a response
  • Notification: The operation can send a message but will not wait for a response

Explain UDDI ?

  • UDDI stands for Universal Description, Discovery and Integration.
  • UDDI is a directory for storing information about web services , like yellow pages.
  • UDDI is a directory of web service interfaces described by WSDL.

Explain REST web service?

  • Representational State Transfer
  • Architectural style (technically not a standard)
  • A network of web pages where the client progresses through an application by selecting links. When client traverses link, accesses new resource (i.e., transfers state)
  • Uses existing standards, e.g., HTTP

Search:

Recent Posts