If you plan on a career in web development–especially if you plan on working on the back end–you’ll need to have a good working knowledge of web services. Your future employer may even quiz you on your web services knowledge during your interview.
While hopefully you’ll have a good knowledge of web services when that time comes, it doesn’t hurt to have a refresher, just so you have the right words on hand. In this article we will define web services, and cover 19 of the most common interview questions.
What is a Web Service?
Web services allow standardized communication between servers, sites, and platforms that are written in different languages and could not normally communicate. Web services typically use XML, and they allow a client to use a request and response system for useful data from dynamic prices to full ebooks from a server that provides them.
For example, I may be building a web application around stock quotes. I would need to get my stock quotes from a reliable source. While I could spend all of my time (along with considerable workforce) manually entering them the thousands of times they change a day, it’s a bit easier to get that data from another source. Yahoo provides a finance web service that I could pull stock quotes from, and because it’s a web service I am able to get that data in format my platform can understand and use.
Web Service Interview Questions
- What is the difference between an asynchronous and a synchronous web service?
An asynchronous service means that the process that calls the service can continue with its process before receiving a response from the web service. The opposite of this is a synchronous service, where all code must stop and wait until the service provides a response.
- What is SOAP?
SOAP stands for ‘Simple Object Access Protocol’ and it is a clear and defined protocol for data transfer.
- What is REST?
REST stands for ‘Representational State Transfer’ and it is an architectural style for web services rather than a protocol. A service using this style is considered ‘restful.’ Restful web services can read SOAP web services, but SOAP services cannot read REST services.
- What qualifies a service as ‘restful?’
A service is restful if it is:
- A client Server
- A layered System
- Has a uniform Interface
- What is the web service protocol stack?
This is a stack of internet protocols that allow web services to communicate, along with other functions like locating and defining services. The stack consists mainly of these protocols:
- Transport Protocol – This is the protocol that allows for transporting messages between network applications. It includes protocols such as HTTP, FTP, SMTP, and BEEP.
- Messaging Protocol – This protocol encodes messages into a common XML format so that the messages can be read by any other service or program.
- Description Protocol – This protocol helps by describing a public interface to a specific Web service.
- Discovery Protocol – This service puts services on a central registry so services that reside on the web can publish their location and description, making them much easier to find.
- What is XML?
XML stands for eXtensible Markup Language. It is a markup language much like HTML, and it’s designed to make documents that are both machine and human readable.
- What is UDDI?
UDDI stands for Universal Description, Discovery, and Integration. It’s registry written in XML that allows businesses to list themselves on the web, and it’s a common discovery protocol in the web service protocol stack.
- What are the biggest security issues with web services?
Web services often don’t have any native security requirements. The biggest security holes have to do with authentication, confidentiality, and network security.
- What is the Entrust Identification Service?
It is a security service provided by Entrust for web services that is in popular use.
- What does PKI mean?
PKI stands for Public Key Infrastructure, and it is a set of policies that allow for digital certificates and public-key encryption on the web.
- What are the two main approaches for creating a web service?
The two main approaches are:
- Top-down – Creating the service starts with creating a WSDL to define the implementation for the service, then building the rest of the web service from that WSDL file. This is also called a contract first or WSDL first approach, and it is the recommended method for creating a web service.
- Bottom-up – Creating the service starts with writing Java classes, then creating a WSDL to meet what’s been programmed. This is also called the code first or service first approach, and it is considered the fastest way to create a web service.
- What programming languages can function with a web service?
This is a trick question. Any language that can communicate with an XML document can communicate with web services, which by design could be almost any language.
- What is a WSDL?
WSDL stands for Web Service Description Language. It’s an XML file that serves as a functional summary of a web service, as well as instructions to the client for accessing that service.
- What is DISCO?
DISCO is a discovery service for web services, which can be included with a DISCO file that points to the web service WSDL.
- What is interoperability?
Interoperability is a marketing term to describe the ability of most web services to communicate with client software without the need for special integration.
- What are a few tools used to test web services?
- REST client
- What is BEEP?
BEEP stands for Blocks Extensible Exchange Protocol. BEEP is designed around building a new protocol for the web that better supports services like instant messaging, network management, and file transfers.
- What is XML-RPC?
RPC stands for Remote Procedure Call. XML-RPC is a method for calling a procedure remotely over the web using XML.
- What is the typical architecture for web services?
Web services typically have three main pillars:
- A service provider – The service provider provides the service, it hosts the service and makes it available for the use of the clients.
- A service requester – The service requester is the client application that calls the web service. They do this via an XML request.
- A service registry – The service registry is a central directory for web services. It helps client software find web services.
These 19 questions do not encompass the sum total of knowledge to get you a career in web services, but they will act as a good reminder before heading in to meet your future employer. However, a good education in web services and dozens of other fantastic tech career paths aren’t hard to find. You are just one coding bootcamp away from a high paying career in web development.