Web Service Interview Prep

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What are the various elements of a SOAP message?

- Body: Contains the call and response messages. Also defined as a child element of the envelope that contains entire application derived XML data, which has been exchanged as a part of the SOAP message. - Envelope: The mandatory root element. Translates the XML document and determines the start and end of the SOAP message. - Fault Element: Handles the errors occurring during the processing of the messages. Appears as a child element of the body if the error is present. - Header: Contains optional message header attributes containing specific application information. Intended to add new features and functionalities, this element can occur several times in a single SOAP message.

Please draw a comparison between SOAP and REST.

- Coupling: Web services and clients are tightly coupled in SOAP. Furthermore, it defines some standards meant to be followed strictly. Contrarily, REST doesn't follow too many standards in addition to offering loose coupling - Data Format and Preference: REST is preferred here and allows several data formats, like HTML and JSON. SOAP supports only the XML data format - Intent: While SOAP serves as a standard protocol for creating web services, REST is an architectural style of building web services - Java API: Java API for RESTful Web Services is JAX-RS while JAX-WS is the Java API for SOAP Web Services - Requirement: REST demands less bandwidth and resources and uses URI for exposing business logic. SOAP, on the other end, requires more bandwidth and resources and uses service interfaces for exposing business logic - Security: REST neither have a defined binding contract nor its own security methods. SOAP, however, uses WSDL contract for binding client programs and web services and has its own defined security methods. - Testing: SOAP web services are tested using SOAPUI. On the other hand, web browsers and extensions, such as Chrome postman, are available for testing RESTful web services

When designing a secure RESTful web service, what points should be followed?

- Execute DELETE, GET, POST, PUT, etc. methods with proper restrictions - Invoke the HTTP generic message whenever and wherever required - Pass sensitive data, like username and session token password, via the POST method. Never use it through the URL - Perform user session-based authentication each time a request is made - Validate all inputs on the server from SQL injection attacks

Please enumerate the various components of Web services.

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

What are the advantages of using web services?

- It helps in achieving the cheaper cost of communication. The use of existing internet can be made for using web services. - It helps in applying standard protocol for every application program. It could help all the client applications to write in a different language, which is understood by them. This way, facilitation is provided to the users using a standard protocol that helps in attaining a kind of cross-platform. - It helps in achieving modularity. That is the web services can help in the creation of service for specific tasks, including tax calculations and various others. - It helps in applying reusability by exposing the web services so that various other applications can be used. - It helps in offering interoperability through which an application can be communicated with other application which may be developed in any different language.

What are the types of Web services?

- SOAP-based web service: It consists of a contract or WSDL file. - RESTful web service: It consists of no contract or WSDL file.

What do you understand by the various layers of the web service protocol stack?

- Service Transport: first layer. - helps in transporting XML messages among various client applications. - protocols used: - Block Extensible Exchange Protocol (BEEP) - File Transfer Protocol (FTP) - Hypertext Transport Protocol (HTTP) - Simple Mail Transport Protocol (SMTP) - XML Messaging: layer where messages are encoded in the common XML format. - consists of: - Simple Object Access Protocol (SOAP) - XML-RPC - Service Description: Consists of available functions, location, and data types of XML messaging. - describes the public interface to a specific web service and includes the WSDL. - Service Discovery: Provides the way for publishing as well as finding web services over the Web. - includes UDDI.

Is there any Microsoft solution for distributed applications?

.NET web services. .NET Remoting.

List the various advantages and disadvantages of SOAP.

Advantages: - Allows communication between various applications - Decouples the communication and encoding protocol from the runtime environment - Defines as well as uses its own security dubbed WS security - Eliminates firewall issues in addition to being vendor-neutral - Permits circulation of messages in a decentralized and distributed environment - Platform as well as programming language independent - Uses HTTP protocol and XML for sending and receiving messages Disadvantages: - Absence of security features - Clients and web services are tightly coupled - Defines standard meant to be followed strictly - Inability to be tested on web browsers - Lightweight formats, other than XML, aren't supported - Slower performance

Enumerate the various primary security issues of Web services.

Authentication - Performed to verify the identity of a user and checking whether the user has the right to access the web service or not. It is also done with the intent of tracking user activity. Following options can be considered for authenticating:Application-level authenticationClient certificatesHTTP digest and HTTP basic authentication Confidentiality - Any individual web service might have several applications. Their service path typically contains a potential weak link at its nodes. Hence, whenever messages or XML requests are sent by the client together with the service path to the server, the same must be encrypted. Network Security - Very important security issue necessitating tools for filtering web service traffic Note: - In order to ensure reliable transactions as well as securing confidential information, web services demand a high level of security.

What are the various elements of WSDL documents?

Binding - Defines as well as determines the protocol as well as the data format for each port type Message - Defines the data elements for each individual operation. It could be the entire document or an argument yet to be mapped Operations - Defines the operations to be performed for processing a message Port Type - Defines the collection of operations which can be performed for binding Types - Defines the message data types, in the form of XML schema, used by the web services

Is it possible to bind SOAP and WSDL?

Binding SOAP and WSDL is possible. It can be done using the following two attributes: Name - Defines the name of the binding Type - Defines the port for the binding

Could you name the core components of the HTTP request and HTTP response.

Core components of HTTP requests are: - HTTP Version: Indicates version - Request Body: Represents message content - Request Header: Contains metadata, such as cache settings and client type, for the HTTP request message - URI: Identifies the resource on the server - Verb: Indicates HTTP methods such as GET, POST, and PUT HTTP response has the following core components: - HTTP Version: Indicates the present version of HTTP - Response Body: Represents the response message content - Response Header: Consists of metadata, like content length and server length, for the HTTP response message - Status/Response Code: Indicates the server status for the requested resource

What is DISCO (Discovery in web services)?

DISCO is referred to as discovery in web services. It helps in grouping the list of different interrelated web services. The DISCO file is issued on the server by the company that provides web services so that the links of all the web services can be made available and used within the local network.

Define Distributed Technologies?

Distributed Technologies allow the segmentation of the application in various units and transfers them to different computer systems and networks. The increase in the number of distributed applications has given rise to distributed technologies.

Please explain the two attributes of the <Port> element in WSDL.

Each <Port> element is related to a distinct binding by defining an individual endpoint. A <Port> element has the following two attributes: Binding - refers to the process of binding that has to be performed as per the linking rules defined by WSDL Name - Provides the unique name within the WSDL document

What do you understand by the term statelessness in respect to RESTful Web Services? What are its advantages and disadvantages?

Following the REST architecture, a RESTful web service isn't allowed to keep a client state on the server. This condition is known as statelessness. In such a situation, the client passes its context to the server. The server then stores the context for processing further client requests. Advantages: - Independent treatment of every method - Simplified application design - Works with the HTTP protocol Disadvantages: - Demands providing extra information about each request for interpreting the client state every time a client interaction takes place

Which are the browsers that allow access to Web Service?

Internet Explorer Safari Mozilla Firefox Opera Google Chrome and various others

Define Postman?

Postman is a teamwork platform for API growth. It is an accepted API client, and it enables you to plan to build, split, test, and document APIs. Using the Postman tool, we can drive HTTP/s requests to a repair as well as get their response. By doing this, we can permit that the service is up and operational.

What do you mean by RESTful Web Services? What are the various advantages of the same?

REST is a contraction for Representational State Transfer. It is the stateless client-server architectural style for developing applications accessible over the Web. Web services using HTTP methods for implementing the REST architecture are called RESTful Web Services. Data and functionality serve as resources accessed by the URI in the REST architectural style. RESTful Web Services have desirable properties like Modifiability, Performance, and Scalability. advantages of using RESTful Web Services: - Can be written in any programming language - Capable of being easily tested over web browsers - Fast and lightweight protocol, consumes less bandwidth and resources - Has loosely coupled implementation - Platform independent - Provides support for an array of data formats, such as JSON and plain text, and technologies

Please explain what you understand by SOA.

SOA stands for Service Oriented Architecture. It is defined as an architectural pattern consisting of services. In SOA, application components provide services to other components via the communication protocol. The communication might involve data exchange or some kind of coordination activity amongst services. Important key principles regarding SOA are: - In addition to being standardized, the service contract must contain the entire description of the services - In order to work with different application types, services should be reusable - Loose coupling defines the less dependency between the web services and the client - Must follow the Service Abstraction rule, according to which, the service shouldn't expose the way functionality is executed to the client application - Services should be stateless and must have the feature of discoverability

What is SOAP in web service?

SOAP is an XML based protocol that helps in transferring data between different computer systems.

How did the concept of security services generated?

The concept of security services was generated before the rising use of the virtual world, and an increase in several frauds, hackings, and virus attacks that were affecting the process of information exchange and making data becomes vulnerable. Thus the security services are developed and upgraded at regular intervals so that the web services could be secured from any kind of activities that impact the interest and cause harm to the users. The various security services include the deployment of the basics of integration, authentication, encryption process, digital signatures, and authorization.

Give a real-life example of web service?

The real-life example of web service is the IBM web service browser. This web service can be bought from IBM Alphaworks site. The purpose of this browser is to show various demos linked with web services. These web services can be used along with the help of SOAP, UDDI, and WSDL, which helps in providing plug and play interface. That can be used for web service, including weather forecast service, traffic reporting service, stock-quote service, and various others.

What is a web service protocol stack?

The web service protocol stack consists of various protocols or procedures used for exploring and executing different kinds of web services. It consists of four layers, including the following. - XML Messaging. - Service Discovery. - Service Transport. - Service Description.

Could you explain the various advantages of using Web services?

There are several advantages of using web services, the most notable of which are described as follows: - Assists in exposing the extant functionalities over the network so that other applications can use them - Easy to deploy, integrate and reuse - Facilitates simple integration thanks to the loose coupling - Low communication cost thanks to the use of SOAP over HTTP protocol - Provides some kind of required functionality to client applications - Supports interoperability, allowing applications to effortlessly communicate and share data as well as services with each other - Uses the standardized web service protocol stack for communication

Can you explain the term UDDI and its features? What language does it use?

Universal Description, Discovery, and Integration is an XML-based standard in the service discovery layer of the web service protocol stack. It uses Web Service Description Language (WSDL). As the UDDI acts like a directory, it is used for finding and publishing web services over the web. Major features: - Acts as a database containing all WSDL files - Helps businesses discover and interact with each other over the Internet - Open framework - Platform-independent - Uses COBRA, Java RMI, and SOAP protocols for establishing communication

What do you understand by WSDL?

WSDL or Web Service Description Language is a simple XML document present in the Service Description layer of the web service protocol stack. It describes the technical details or locates the UI to the web service. It contains the following important information: - Header information - Method name - Method parameters - Origin - Port types - Service endpoint

What is the full form of WSDL? What is the function of WSDL in web service?

WSDL stands for Web Services Description Language. Its function is to describe the user interface to a web service. This way, it acts as a service description layer in the web service protocol stack.

What are the standards in Web services?

WSDL: used to create an interface definition. HTTP: used in communication channels. UDDI: used for creating business registries. SOAP: used for structuring data.

What is the pre-requisite for deploying Web Service?

Web Application Directory. Bin Directory. Web.Config File. Disco File. Webservice. Webservice.asmx File.

How does the web service work?

Web service helps in communication among various other applications by applying open standards, including SOAP, WSDL, XML, and HTML. For instance, we can create a Java-based web service on Solaris, which is accessible from the Visual Basic programs that run on the computer window. Another example would be of using C# to develop new web services on windows by using a web application that is based on JSP or Java Server Pages and runs on Linux.

What do you understand by Web Service?

Web service is a software that is available in the virtual world and supports access to the internet. It is characterized by an XML messaging system that allows users to interact through the web. Web service is an easy to understand interface that can be used by the user.

What points should you consider while binding in WSDL?

While binding in WSDL, a port must not: - Specify any kind of binding information other than the address information - Specify more than one address

What is XML-RPC in web service?

XML-RPC is a protocol that supports the XML messaging service for making remote procedure calls.

Can we access the web service class method using the Internet?

Yes, we can access the web service class method using the internet by qualifying a method with the WebMethod attribute.

Do we need security in web services? Explain?

Yes, we do need security in the web services so that confidential information and transactions can be made reliable. The security in web services is attained through SSL or Service Socket Layer, which helps in creating an Entrust Secure Transaction Platform.

Do you know what the XML-RPC protocol is? Explain its features.

a simple protocol capable of performing remote procedure calls by means of XML messaging to establish connections among a variety of computers and distinct distinct environments. - Allows establishing communication amongst diverse applications - Has small XML vocabulary for describing the nature of request and response - HTTP Response has XML Response embedded in it - Platform-independent - Remote procedure calls are performed using simplistic XML - Uses HTTP protocol in order to pass information between client and server computers - XML encoded requests are sent through HTTP POST

Could you explain the term Interoperability in the context of Web services?

refers to the ability of two or more products or systems to work in tandem without any special requirements. In the context of web services, the term interoperability means communication and sharing data and services amongst applications.


Set pelajaran terkait

HESI - OB, RHO(D) Immune Globulin

View Set

Chapter 22: Sixteenth-Century Art in Northern Europe and the Iberian Peninsula

View Set

4.1.4.3 The law of diminishing marginal returns

View Set