Most Important Web Services Interview Questions and Answers

What is a Web Service?
A web service is a network accessible interface to application programs, built using standard Internet technologies.Clients of web services do NOT need to know how it is implemented.

What are the benefits of the Web Services ?
Web services use this special architecture because it:

  • Can be used from any platform.
  • Uses a standard, well-know channel.
  • Is routable and will pass through most firewalls.
  • Uses the same security mechanisms as any web site.
What is SOAP?
SOAP is a Lightweight messaging framework based on XML and its supports simple messaging and RPC.

  • SOAP consists of
    • Envelope construct: defines the overall structure of messages
    • Encoding rules: define the serialization of application data types
    • SOAP RPC: defines representation of remote procedure calls and responses
    • Binding framework: binding to protocols such as HTTP, SMTP
    • Fault handling
  • Soap supports advanced message processing:
    • forwarding intermediaries: route messages based on the semantics of message
    • active intermediaries: do additional processing before forwarding messages, may modify message
What Contains SOAP Message ?
SOAP messages consist of
Envelope: top element of XML message (required)
Header: general information on message such as security (optional)
Body: data exchanged (required)

What is Fault element in SOAP ?
Fault element Carries an error message and If present, must appear as a child of <Body>. It must only appear once. Fault element contains the following sub-elements:
<faultcode> : A code for identifying the fault (VersionMismatch, MustUnderstand, Client, Server)
<faultstring> : A human readable explanation of the fault
<faultactor> : Information about who caused the fault to happen
<detail> : Holds application specific error information related to the Body element

What are the Binding Protocols supports in SOAP ?

What is Static stub client ?
stubs are created before runtime (by wscompile), it is usually called a static stub. .It makes this call through a stub, a local object which acts as a proxy for the remote service.

What isDynamic Proxy client ?
This client creates a Service object which is factory of proxies(stubs are created at runtime dynamically)

What is Web Client ?
This client used .jsp pages to display web form for the user to enter zipcode to get weather forecast by calling getWeatherReport  function on the stubs created before.  

What is WS-Security ?
WS-Security provides soap message protection through message integrity, confidentiality, and single message authentication
extensible and flexible  (multiple security tokens, trust domains, signature formats, and encryption technologies.). A flexible set of mechanisms that can be used to construct a range of security protocols

What is WS - Policy ?

Describes the capabilities and constraints of the security and business policies on intermediaries and endpoints.

What is WS - Trust ?
Framework for trust models that enables web services to interoperate securely.

What is WS-Privacy ?
Model for how web services and requesters state privacy
preferences and organizational privacy practice statements

Explain WS-SecureConversation ?
Manage and authenticate message exchanges between parties, including security context exchange and establishing and deriving
session keys

How to Secure a Web Service?

  • Integrity - information is not modified in transit
    • XML signature in conjunction with security tokens
    • Multiple signature, multiple actors, additional signature formats
  • Confidentiality - only authorized actors or security token owners can view the data
    • XML encryption in conjunction with security tokens
    • Multiple encryption processes, multiple actors
  • Authentication
Explain WSDL ?
WSDL stands for Web Service Description Lanaguage. WSDL is a standard method of describing web services and their specific capabilities (XML). 
WSDL Definition: WSDL is an XML-based language through which a web service conveys to applications the methods that the service provides and how those methods are accessed.

What are elements conatins in WSDL file?
WSDL file contains following elements 
  • <definitions> are root node of WSDL
  • <import> allows other entities for inclusion
  • <types> are data definitions - xsd
  • <message> defines parameters of a Web Service function
  • <portType> defines input and output operations
  • <binding> specifies how each message is sent over the wire
What is UDDI ?
UDDI stands for Universal Description, Discovery, and Integration.UDDI defines XML-based rules for building directories in which companies advertise themselves and their web services

What is "wscompile" ?
The wscompile tool generates stubs, ties,      serializers, and WSDL files used in JAX-RPC clients and services. The tool reads as input a configuration file and either a WSDL file or an RMI interface that defines the service.

What is "wsdeploy" ?
It reads a WAR file (something like Jar file) and the jaxrpc-ri.xml  file and then generates another WAR file that is ready for deployment.

Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email