WebService interview questions set 1/WebServices Interview Questions and Answers for Freshers & Experienced

Differentiate between .NET Web Services and .NET Remoting?

As far as protocol is concerned, .NET Web Service uses HTTP, while, .NET Remoting uses any protocol i.e. TCP/HTTP/SMTP. When it comes to performance, .NET Remoting is comparatively, faster than.NET Web Service. Also, as .NET Web Services are hosted via IIS, therefore, it is far more reliable than the .NET Remoting.

How a .NET web service is tested?

ASP.NET uses a test page routinely, when one calls for the URL of .asmx file in any browser. This page shows complete information regarding web services.

Explain in brief, what DISCO is?

DISCO means discovery. It groups the list of interrelated web services. The organization that provides web services, issues a DISCO file on its server and that file contains the links of all the provided web services. This standard is good when client knows the company already. Also it can be used within a local network as well.

Can you name some standards used in web services?

The standards used in web services are WSDL (used to create interface definition), SOAP (used to structure data), HTTP (communication channels), DISCO (used to create discovery documents) and UDDI (used to create business registries).

Can you tell few benefits of web services?

The biggest advantage of web service is that is supported by wide variety of platforms. Moreover, in near future, web services may spread its boundary and enhance new methods that will provide ease to clients. The enhancement will not affect the clients, even if they offer old methods and parameters.

Differentiate between web services, CORBA and DCOM?

Web services transfer/receive messages to/from application respectively, via HTTP protocol. It uses XML to encode data.

CORBA and DCOM transfer/receive messages to/from application respectively, via non-standard protocols such as IIOP and RPC.

What are distributed technologies?

The increasing ratio of distributed applications has raised demand for distributed technologies. It allows segmenting of application units and transferring them to different computers on different networks.

Why is API testing considered as the most suitable form for Automation testing?

API testing is now preferred over GUI testing and is considered as most suitable because:

>> It verifies all the functional paths of the system under test very effectively.
>> It provides the most stable interface.
>> It is easier to maintain and provides fast feedback.

What are major challenges faced in API testing?

If you can overcome the challenges in API Testing, you can be confident in the API testing interview too. They are:

> Parameter Selection
> Parameter Combination
> Call sequencing
> Output verification and validation
> Another important challenge is providing input values, > which is very difficult as GUI is not available in this case.

What are differences between API Testing and UI Testing?

>> API enables communication between two separate software systems. A software system implementing an API contains functions or subroutines that can be executed by another software system.

>> On the other hand, UI ( User Interface) testing refers to testing graphical interface such as how users interact with the applications, testing application elements like fonts, images, layouts etc. UI testing basically focuses on look and feel of an application.

What are the situations, when we need ASP.NET web services?

ASP.NET web services are used when one need to implement three tier architecture in a web service. It allows handy ways to use middle tier components through internet. The main advantage of .NET Web services is that they are capable enough to communicate across firewalls because they use SOAP as transport protocol.

What is use of javax.xml.ws.Endpoint class?

Endpoint class provides useful methods to create endpoint and publish existing implementation as web service. This comes handy in testing web services before making further changes to deploy it on actual server.

What is the use of Accept and Content-Type Headers in HTTP Request?

These are important headers in Restful web services. Accept headers tells web service what kind of response client is accepting, so if a web service is capable of sending response in XML and JSON format and client sends Accept header as “application/xml” then XML response will be sent. For Accept header “application/json”, server will send the JSON response.

Content-Type header is used to tell server what is the format of data being sent in the request. If Content-Type header is “application/xml” then server will try to parse it as XML data. This header is useful in HTTP Post and Put requests.

Can we maintain user session in web services?

Web services are stateless so we can’t maintain user sessions in web services.

What is REST?

REST stands for Representational State Transfer. REST itself is not a standard, while it uses various standards such as HTTP, URL, XML/HTML/GIF/JPEG (Resource Representations) and text/xml, text/html, image/gif, image/jpeg, etc (MIME Types).

Can you name few free and commercial implementations for web services?

The implementations I know are Apache SOAP, JAX-WS Reference Implementation, JAX-RS Reference Implementation, Metro, Apache CXF, MS.NET and Java 6.

If you have to choose one approach, then what will be your choice?

In my point of view, the first approach that is the contract-first approach is more feasible as compared to the second one but still it depends on other factors too.

Differentiate between a SOA and a Web service?

SOA is a design and architecture to implement other services. SOA can be easily implemented using various protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP, RPC etc. While Web service, itself is an implemented technology. In fact one can implement SOA using the web service.

What tools are used to test a web service?

I have used SoapUI for SOAP WS and Firefox poster plugin for RESTFul Services.

What do you mean by PKI?

It means Public-Key Infrastructure.

Which language is used by UDDI?

UDDI uses the language known as WSDL (Web Service Description Language)

What do you understand by XML-RPC?

RPC is Remote Procedure Call and as the name suggests, it is the method of calling a procedure or function available on any remote computer.

XML stands for Extensible Markup Language. Thus XML-RPC represents a simple protocol that performs RPCs by using XML messaging. This has been considered an excellent tool for connecting different environments and also establishing connections between wide variety of computers.

Define web service protocol stack and its layers?

Web service protocol stack consists of 4 layers. This can be described as follows:

a) Service transport: This is the first layer that helps in transporting XML messages between various client applications. This layer commonly uses the below-mentioned protocols:

<> HTTP(Hypertext Transport Protocol)
<> SMTP(Simple Mail Transport Protocol)
<> FTP(File Transfer Protocol)
<> BEEP(Block Extensible Exchange Protocol)
b) XML messaging: This layer is based on the XML model where messages are encoded in common XML format which is easily understood by others. This layer includes

<> XML-RPC
<> SOAP(Simple Object Access Protocol)

c) Service description: This layer contains descriptions like location, available functions, and data types for XML messaging which describes the public interface to a specific web service. This layer includes:

WSDL(Web Service Description Language)
d) Service discovery: This layer is responsible for providing a way to publish and find web services over the web. This layer includes:

<> UDDI(Universal Description, Discovery, and Integration)

Some common protocols used in API testing?

Many protocols are now available to be used in API testing, such as JMS, REST, HTTP, UDDI and SOAP.

What are some important annotations which you use to create Restful web services?

Some of important annotations which are used for creating web services are:

@Path : This is used to set path for URI at class level or method level.

@GET,@POST,@PUT,@DELETE : There are annotations corresponds to HTTP methods.

@Produces(MediaType.TEXT_XML [, more-types ]): @Produces defines which MIME type is delivered by a method.

@PathParam: Used to inject values from the URL into a method parameter.
@Consumes(MediaType.TEXT_XML) : @Cosumes defines which MIME type will be consumed by the method .

What is JAX-RS?

Java API for RESTful Web Services (JAX-RS), is a set if APIs to create web service which supports REST architecture. JAX-RS is part of the Java EE6, and help developers to create REST web application easily.

What are Restful web services?

In the web services terms, REpresentational State Transfer (REST) is a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URIs. Web services client uses that URI to access the resource.

What are the advantages of API Testing?

In an API interview, they are likely to ask about the advantages of API testing. So be prepared with the significant ones such as:

<> Test for Core Functionality: API testing provides access to the application without a user interface. The core and code-level of functionalities of the application will be tested and evaluated early before the GUI tests. This will help detect the minor issues which can become bigger during the GUI testing.

<> Time Effective: API testing usually is less time consuming than functional GUI testing. The web elements in GUI testing must be polled, which makes the testing process slower. Particularly, API test automation requires less code so it can provide better and faster test coverage compared to GUI test automation. These will result in the cost saving for the testing project.

<> Language-Independent: In API testing, data is exchanged using XML or JSON. These transfer modes are completely language-independent, allowing users to select any code language when adopting automation testing services for the project.

<> Easy Integration with GUI: API tests enable highly integrable tests, which is particularly useful if you want to perform functional GUI tests after API testing. For instance, simple integration would allow new user accounts to be created within the application before a GUI test started.

Who can use a Web API?

Web API can be consumed by any clients which support HTTP verbs such as GET, PUT, DELETE, POST. Since Web API services do not require configuration, they can be easily used by any client. In fact, even portable devices such as mobile devices can easily use Web API, which is undoubtedly the biggest advantage of this technology.

What is wsimport?

wsimport is utility which generates java classes from WSDL. It is part of JDK 6.

What are some architectural styles for creating a Web API?

This is one of the fundamental Web API interview questions. Bellows are four common Web API architectural styles:

>> HTTP for client-server communication
>> XML/JSON as formatting language
>> Simple URI as the address for the services
>> Stateless communication

What are some important annotations for JAX-WS?

<> @WebService
<> @WebMethod
<> @SOAPBinding

What is JAX-WS?

JAX-WS stands for Java API for XML Web Services. JAX-WS is standard XML based Java API which is used to create SOAP web services.

What is REST Web Services?

REST is the acronym for REpresentational State Transfer. REST is an architectural style for developing applications that can be accessed over the network. REST architectural style was brought in light by Roy Fielding in his doctoral thesis in 2000.

REST is a stateless client-server architecture where web services are resources and can be identified by their URIs. Client applications can use HTTP GET/POST methods to invoke Restful web services. REST doesn’t specify any specific protocol to use, but in almost all cases it’s used over HTTP/HTTPS. When compared to SOAP web services, these are lightweight and doesn’t follow any standard. We can use XML, JSON, text or any other type of data for request and response.

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.

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 UDDI means?

UDDI stands for Universal, Description, Discovery, and Integration. It is the discovery layer in the web services protocol stack.

Define Entrust Identification Service?

Entrust Identification Service comes from the Entrust Security Transaction Platform. This platform allows companies to control the identities that are trusted to perform transactions for Web services transactions.

Do you have any idea about foundation security services?

As implies from its name, these services are the foundation or basics of integration, authentication, authorization, digital signatures and encryption processes.

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 kind of security is needed for web services?

The security level for web services should be more than that of what we say Secure Socket Layer (SSL). This level of security can be only achieved from Entrust Secure Transaction Platform. Web services need this level of security to ensure reliable transactions and secure confidential information .

Define WSDL?

It means Web Services Description Language. It is basically the service description layer in the web service protocol stock. The Service Description layer describes the user interface to a web service.

Can you define each of these layers of protocol stack?

The Service Transport layer transfer messages between different applications, such as HTTP, SMTP, FTP, and Blocks Extensible Exchange Protocol (BEEP). The XML Messaging layer encodes messages in XML format so that messages can be understood at each end, such as XML-RPC and SOAP. The Service Description layer describes the user interface to a web service, such as WSDL. The Service Discovery layer centralizes services to a common registry and offer simple publish functionality, such as UDDI.

What is new in this field for past few years?

The initiation of XML in this field is the advancement that provides web service a single language to communicate in between the RPCs, web services and their directories.

Give me an example of real web service?

One example of web services is IBM Web Services browser. You can get it from IBM Alphaworks site. This browser shows various demos related to web services. Basically web services can be used with the help of SOAP, WSDL, and UDDI . All these, provide a plug-and-play interface for using web services such as stock-quote service, a traffic-report service, weather service etc.

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 the components of web service?

The different components of web services are as follows:

<> SOAP- Simple Object Access Protocol.
<> UDDI- Universal Description, Discovery, and Integration.
<> WSDL- Web Service Description Language.
<> RDF- Resource Description Framework.
<> XML- Extensible Markup Language.

What are different types of Web Services?

There are two types of web services:

1) SOAP Web Services: Runs on SOAP protocol and uses XML technology for sending data.
2) Restful Web Services: It’s an architectural style and runs on HTTP/HTTPS protocol almost all the time. REST is a stateless client-server architecture where web services are resources and can be identified by their URIs. Client applications can use HTTP GET/POST methods to invoke Restful web services.

What are the advantages of Web Services?

Some of the advantages of web services are:

>> Interoperability: Web services are accessible over network and runs on HTTP/SOAP protocol and uses XML/JSON to transport data, hence it can be developed in any programming language. Web service can be written in java programming and client can be PHP and vice versa.

>> Reusability: One web service can be used by many client applications at the same time.

>> Loose Coupling: Web services client code is totally independent with server code, so we have achieved loose coupling in our application.

>> Easy to deploy and integrate, just like web applications.

>> Multiple service versions can be running at same time.

Explain Web Services?

A Web Service can be defined as an application component for communication or say exchanging information between two applications over the network. Web services basically work on a client-server model where web services are easily accessible to client applications over the network.

To enable communication between various applications, web services take the help of open standards like XML (for data tagging), SOAP (for message transferring) and WSDL (to denote service availability).

Search
R4R Team
R4R provides WebServices Freshers questions and answers (WebServices Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,WebService interview questions set 1,WebServices Freshers & Experienced Interview Questions and Answers,WebServices Objetive choice questions and answers,WebServices Multiple choice questions and answers,WebServices objective, WebServices questions , WebServices answers,WebServices MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for WebServices fresher interview questions ,WebServices Experienced interview questions,WebServices fresher interview questions and answers ,WebServices Experienced interview questions and answers,tricky WebServices queries for interview pdf,complex WebServices for practice with answers,WebServices for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .