If you plan on a career in web development, you’ll need to have a good working knowledge of web services. This is especially the case if you plan on working on the back end. Your future employer may even quiz you on your web services knowledge during your interview.
You’ll hopefully have a good knowledge of web services when that time comes. However, 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. They typically use XML. In short, web services allow a client to use a request and response system for useful data from a server that provides them.
For example, take the development of a web application around stock quotes. Of course, I would need to get my stock quotes from a reliable source. I could spend all of my time (along with considerable workforce) manually entering them the thousands of times they change a day. However, it’s simply easier to get that data from another source. For instance, Yahoo provides a finance web service that I could pull stock quotes from. Because it’s a web service, I am able to get that data in a 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.’ 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. Furthermore, 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. It’s designed to create 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. UDDI is 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. Generally, the biggest security holes have to do with authentication, confidentiality, and network security.
- What is the Entrust Identification Service?
It is a popular security service provided by Entrust for web services.
- 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?
This is a common question in web service interviews. 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. 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. In fact, most professionals consider it the fastest way to create a web service.
- What programming languages can function with a web service?
This is a trick question you may encounter during a web service interview. Any language that can communicate with an XML document can communicate with web services. By design, this 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. It also acts as instructions to the client for accessing that service.
- What is DISCO?
DISCO is a discovery service for web services. It 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 – Provides the service, hosts it, and makes it available for the use of the clients.
- A service requester – This 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 cover everything you need to know to start your career in web services, but they will act as a good reminder before heading in to meet your future employer.
To further your education in web services—or any other tech career path—remember that there are hundreds of excellent coding bootcamps out there. You are just one coding bootcamp away from a high paying career in web development!