Top 50 Web Services Interview Questions You Must Prepare 26.Apr.2024

The presentation layer establishes the data format prior to passing it along to the network application’s interface. TCP/IP networks perform this task at the application layer.

The ServiceInstaller class, also known as the project installer class, is used to install a Windows service.

There are different way to deploy the web application in web server like:

  1. X Copy deployment.
  2. create setup package and install the server machine.
  3. use the deployment tools and configure the server repository and drag and drop all files in your machine to virtual folder of server machine.

• Web service is the way to publish application's function on web that can be accessible to the rest of the world.
• Web services are the components that can be used by other applications
• ASP.NET offers easy way to develop web services, just precede the functions with a special WebMethod ()> attribute in order them to work as Web Service.
• Web services are discovered using UDDI directory services.
• Web services are built on XML standard and use SOAP protocol that allows them to communicate across different platforms and programming languages.
• Web services easily manage to work across corporate firewalls as they use HTTP protocol which is firewall friendly.
• Web services platform elements are
SOAP (Simple Object Access Protocol)
UDDI (Universal Description, Discovery and Integration)
WSDL (Web Services Description Language)
• The web services are built on internet standards that are not platform or language specific.
• The .Net framework provides in-built classes to build and consume web services.
• The components offered by web services are reusable.
• The examples of web service components can be shipment tracking, translation utility, weather forecasting, sports scores etc.

• The key benefit of having distributed components is that they spread out the load over different machines.
• The components can be upgraded without disturbing the clients code.
• The distributed application improves security. For example, a company who has many agents wouldn’t like those agents to have direct access to its database. Instead, these agents can be granted access to the components running on the corporate server which can be controlled and restricted.

There are many properties defined in the WebServices class:
• Application - Obtains the application object for the current HTTP request.
• Context - Obtains the HttpContext object for the current request, which encapsulates all HTTP-specific context used by the HTTP server to process Web requests.
• Server - Obtains the HttpServerUtility object for the current request.
• Session - Obtains the HttpSessionState object for the current request.
• SoapVersion - Obtains the version of the SOAP protocol used to make the SOAP request to a Web service.
• User - Obtains the Server User Object. This property can be used to authenticate whether a user is authorized to execute the request.

A web browser is a software application for viewing webpages. Microsoft Internet Explorer, Mozilla FireFox, Opera, and Apple Safari are the most common web browsers.

Web services is at its core software that can be accessed online that uses an XML messaging system, which encodes the communications in web services. 

An attack technique that forces a web site to echo client-supplied data, which execute in a users web browser. When a user is Cross-Site Scripted, the attacker will have access to all web browser content (cookies, history, application version, etc). XSS attacks do not typically directly target the web server or application, but are rather aimed at the client. The web server is merely used as a conduit for the XSS data to be presented to the end client. 

The main method of uploading files to your site’s account is by using FTP. When you sign up with a host, you will probably get an FTP account that lets you access files in your account (usually ftp.yoursitename.com, your main account name and password). Then you can use a built-in Windows or Internet Explorer FTP client, or some other software that supports FTP such as CuteFTP. WS_FTP, or Total Commander, to transfer files from your hard drive to your account. If you don’t get an FTP account or if you prefer a Web interface, you can use your account control panel’s File Manager instead.

The following types of services are provided to web applications:
• XML schema for the descriptions of business includes specifications and service publisher on web service.
• Web registry of web services include service, business and binding information for web service.

The portType element contains the operations exposed by the Web service, and the messages involved in the communication between the Web service and its consumers.

The properties of application Pool in IIS is:

  • Recycling
  • Performance
  • Health
  • Identity

The full form of WSDL is Web Services Description Language which represents a layer in the protocol stack of web service. Data types for all XML messages are contained in WSDL and the information about all XML messages are provided in it. Address information of locating services is given by WSDL.

Testing a Web Service
.NET has a test web page that ASP.NET uses automatically when you request the URL of an .asmx file in a browser. This page uses reflection to read and show information about the web services, such as the names of the methods it provides.

Consuming a Web Service
Web services are built on XML standard. So, a client needs to equip itself to understand XML-based message in order to exchange messages. The .Net framework provides proxy component that enable clients to interact with web services. The proxy has all necessary information that can be utilized by the client application to share data with web services.

The mustUnderstand attribute indicates that a header entry is either required or optional for the recipient to process further.

A safer browser has the following characteristics:

  • Latest version.
  • Automatic software patches and upgrades.
  • Anti-phishing functionality to notify you when you try to access a suspected fake website.
  • 128-bit encryption that protects data during transmission.

Transport Layer Security (TLS) extends SSL by providing cryptographic authentication.

Yes, run ipv6.exe from command line to disable it.

This depends on a web host and a plan. Most plans will allow running scripts in languages such as Perl or PHP. Some plans will also allow you to compile program in C/C++ and run them. Some Unix plans will also allow you to run “cron” which enables you to automatically execute programs or scripts at a specific time and date. However to get a full control over all aspects of your server, you will need a dedicated or co-located server instead of a shared plan.

The basic type contains partitions, extended partitions, logical drivers, and an assortment of static volumes.

The dynamic type does not use partitions but dynamically manages volumes and provides advanced storage options.

Web service is like software which makes it available on the web. The consistent XML messaging system is used by web services. To use a web service, a message is invoked by the client, and a request is sent to the server in XML format and a response is given to the client in XML file format by the server. Web services are not dependent on the platform and any application can access it which is developed in any programming language.

JAXM messaging models has two types of messaging model, synchronous and asynchronous.

  • Synchronous messaging model:

In this type of model, client directly interacts with the source. The client sends a request and waits for the response.

  • Asynchronous messaging model:

In this model, client sends message to the messaging provider and returns back. Messaging provider then performs the routing of message to the end source.

UDDI, Universal description, discovery and integration:
It is the directory that is used to publish and discover public web services.

DISCO, Discovery:
commonly known as Discovery. Discovery clubs together common services and exposes schema document of the web services.

WSDL, Web Service description language:
This is used to describe web services. The description includes

  • URL of web services
  • Method and properties supported by web services
  • Data type it supports.
  • Protocol detail it supports.

 

Following are the steps to get a proxy object of a web service at the client side.

  • Access UDDI node for a list of web services.
  • Services thus responded by UDDI have URL pointing to DISCO or WSDL document.
  • Parse DISCO and WSDL document and build a proxy object which can communicate with the web service.

• XML Web services are more restricted than objects exposed over .NET Remoting.
• XML Web services support open standards that target cross-platform use.
• XML Web services are generally easier to create and due to the restricted nature of XML Web services, the design issues are simplified.
• XML Web services support only SOAP message formatting, which uses larger XML text messages.
• Communication with .NET Remoting can be faster than XML Web service communication with a binary formatter.
• XML Web services are designed for use between companies and organizations.
• XML Web services don't require a dedicated hosting program because they are always hosted by ASP.NET.
• Consumers can use XML Web services just as easily as they can download HTML pages from the Internet. Thus there's no need for an administrator to open additional ports on a firewall as they work through MS-IIS and ASP.NET

Uptime is the percentage of time that a web site is working. For example, if some host has an uptime average of 99.86%, this means that your site will be down for a total about 1 hour each month, We monitor uptime of customer websites of many web hosts and we display this data on the hosts details page. Some hosts also offer “uptime guarantees” but this is not as valuable as it might appear.

The following are the advantages of web services over COM and DCOM:
• It is simple and easy to use web services and it is implemented on different platforms.
• The web services are loosely coupled and their methods and interfaces can be extended.
• Stat information is not carried by web services so that numerous requests are processed simultaneously.

In web browsers, a plug-in (also called plugin, addin, add-in, addon, add-on, snap-in or snapin) consists of a computer program that interacts with a host application (a web browser or an email client, for example) to provide a certain, usually very specific, function “on demand”. Add-on is often considered the general term comprising plug-ins, extensions, and themes as subcategories.

The easiest way to get started with Web services is to learn XML-RPC. Check out the XML-RPC specification or read my book, Web Services Essentials. O'Reilly has also recently released a book on Programming Web Services with XML-RPC by Simon St.Laurent, Joe Johnston, and Edd Dumbill.

Once you have learned the basics of XML-RPC, move onto SOAP, WSDL, and UDDI. These topics are also covered in Web Services Essentials. For a comprehensive treatment of SOAP, check out O'Reilly's Programming Web Services with SOAP, by Doug Tidwell, James Snell, and Pavel Kulchenko.

WSDL is the Web Service Description Language, and it is implemented as a specific XML vocabulary. While it’s very much more complex than what can be described here, there are two important aspects to WSDL with which you should be aware. First, WSDL provides instructions to consumers of Web Services to describe the layout and contents of the SOAP packets the Web Service intends to issue. It’s an interface description document, of sorts. And second, it isn’t intended that you read and interpret the WSDL. Rather, WSDL should be processed by machine, typically to generate proxy source code (.NET) or create dynamic proxies on the fly (the SOAP Toolkit or Web Service Behavior).

A Web service is a class that allows its methods to be called by methods on other machines via common data formats and protocols, such as XML and HTTP. In .NET, the over-the-network method calls are commonly implemented through the Simple Object Access Protocol (SOAP), an XML-based protocol describing how to mark up requests and responses so that they can be transferred via protocols such as HTTP. Using SOAP, applications represent and transmit data in a standardized XML-based format.

The following are the ways to prevent your Web service from unauthorized access:
• Using encryption and message-based security.
• Using authentication and access controls for the Web service.

Domain parking lets you cheaply reserve a domain name for future use and display an “under construction” default page on it. You can register a domain and not park it anywhere hut then your site will simply be inaccessible until you get a web host. Some registrar let you park your domain for free.

Attaching the WebMethod attribute to a Public method indicates that you want the method exposed as part of the XML Web service. The WebMethod attribute tells .NET that a particular public method should be exposed as a web-callable method. The WebMethod attribute has six associated properties to document and change the behavior of your web method. They are:

  • Description
  • MessageName
  • EnableSession
  • CacheDuration
  • TransactionOption
  • BufferResponse


The first two properties are used to document a web method, while the others affect its behavior.

Opera is a web browser and Internet suite developed by the Opera Software company. The browser handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, chatting on IRC clients, downloading files via BitTorrent, and reading Web feeds. Opera is offered free of charge for personal computers and mobile phones.

The proxy file must be stored in the /bin directory. This directory is situated under the root directory of the application.

SSL (Secure Sockets Layer) is a secure communications protocol used by browsers, websites, and applications to protect information sent over the internet. SSL protocol uses encryption and authentication technologies to make sure only the intended parties can read the information.

The Simple Object Access Protocol (SOAP) is a platform-independent protocol that uses XML to make remote procedure calls.

Each request and response is packaged in a SOAP message containing the information that a Web service requires to process the message.

SOAP supports an extensive set of types like the primitive types, DataSet, DateTime, XmlNode and others. SOAP can also transmit arrays of these types and objects of user-defined types.

Windows services, previously known as NT services, are applications that are installed on the system as system services. In other words, Windows services are applications that run in the background with the Windows operating system. The primary use of Windows services is to reduce the consumption of memory required for performing backend operations. Let's take an example to understand this easily. Suppose you want to perform a variety of functions, such as monitor the performance of your computer or application, check the status of an application, and manage various devices, such as printers.

In such a case, you can use Windows services to reduce memory consumption. In addition, Windows services can run on your system even if you have not logged on to your computer. In addition, these services do not have any user interface.

Following are the standards used by web services:

WSDL
WSDL is used to create interface definition for a web services. It describes all about methods to the client, i.e. methods available in a web service, their parameters and return values.

SOAP
SOAP, Simple Object Access Protocol is a communication protocol, a way to structure data, based on XML. The web services use SOAP message format to encode information before sending.

HTTP
The SOAP message format in web services uses HTTP as communication protocol, i.e. SOAP messages are sent over HTTP channels.

DISCO
It is used to create discovery documents that provide links to multiple web service endpoints. The DISCO standard creates a single file that groups a list of related web services. A company can publish a DISCO file on its server that contains links to all the web services it provides.

UDDI
A standard for creating business registries that catalog companies, the web services they provide, and the corresponding URLs for their WSDL contracts.

Microsoft Internet Explorer usually has the fastest startup time on Microsoft Windows machines, although this is mostly because the real “price” of starting it up is paid during the booting of your Microsoft Windows system, Opera is the fastest browser in terms of placing minimal demands on an older computer. Firefox is a very fast descendant of Mozilla, well-tuned for real-world browsing experiences, with an interface that speeds up the way you get things done in a web browser by offering features like tabbed browsing and a more elegant “find” feature --another relevant kind of speed.

The need of distributed technologies arises with the requirement of distributed computing applications. The distributed computing allows partitioning of application logic into units and spreading the unit over different computers of a network or across different networks. This helps in spreading out loads over many computers. The components once developed can be reuse by other applications. There are many technologies developed to allow the distribution and reuse of application logic.

Web hosting is the act of renting space and bandwidth through a company so that you may publish your web site online.

It is necessary to build a proxy class by using the wsdl.exe utility before a Web service can be consumed.

XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response. More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls. Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server.

To get a quick sense of XML-RPC, here is a sample XML-RPC request to a weather service (with the HTTP Headers omitted):
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
<methodName>weather.getWeather</methodName>
<params>
<param><value>10016</value></param>
</params>
</methodCall>
The request consists of a simple element, which specifies the method name (getWeather) and any method parameters (zip code).

DISCO
DISCO, an abbreviation of discovery, is a file that groups together a list of related web services. A company that offers web services publishes a DISCO file on its server that has links of all the web services it provides. The client requests this file to see all the available web services. This standard is useful when client already know about a company that offers web services. You can also use DISCO standard while working in local network. It is not helpful to find all web services over the internet.

UDDI
UDDI (Universal Description, Discovery, and Integration) offers centralized directory for web services over the internet. It hosts web services from different companies and can be used by the clients to find web services of their specific need. To make web services shared publicly, they have to be published in UDDI.