Friday, March 15, 2019

Web services and SOAP

 web applications with web services, indicating the need for web services

Web services achieve this task with the help of XML, SOAP, WSDL and UDDI open standards. web services do not necessarily have a user interface since it is used as a component in an application. An application that the users access over the internet is called a web application.


There are three types of operations:
1. One way
2. Request response
3. Notification
Web Services vs Web Applications
  • Web Services can be used to transfer data between Web Applications.
  • Web Services can be accessed from any languages or platform.
  • A Web Application is meant for humans to read, while a Web Service is meant for computers to read.
  • Web Application is a complete Application with a Graphical User Interface (GUI), however, web services do not necessarily have a user interface since it is used as a component in an application.
  • Web Application can be access through browsers.


Discuss what WSDL is and the use of it in the context of web services

WSDL Web Services Description Language is an XML-based standard for describing a web service. A WSDL document (often itself just called a WSDL) describes the available functions of a web service, their expected arguments, and the data types for their return values. WSDLs are used by developers of client applications that consume XML-based web services.

Fundamental properties of a WSDL document and the use of WSDL document in web services and client development 

WSDL document is a document that is used to describe a web service. This is key for any client application to know where the web service is located. It also allows the client application to understand the methods available in the web service. '
At an abstract level, WSDL 2.0 describes a Web service in terms of the messages it sends and receives; messages are described independent of a specific wire format using a type system, typically XML Schema. An operation associates a message exchange pattern with one or more messages.

structure of the WSDL document, explaining the elements in WSDL

WSDL Document Elements. A WSDL document has a definitions element that contains the other five elements, types, message, port Type, binding and service. The following sections describe the features of the generated client code. WSDL supports the XML Schema specification (XSD) as its type system. 
A WSDL document contains the following elements −
  • Definition − It is the root element of all WSDL documents. It defines the name of the web service, declares multiple namespaces used throughout the remainder of the document, and contains all the service elements described here.
  • Data types − The data types to be used in the messages are in the form of XML schema.
  • Message − It is an abstract definition of the data, in the form of a message presented either as an entire document or as arguments to be mapped to a method invocation.
  • Operation − It is the abstract definition of the operation for a message, such as naming a method, message queue, or business process, that will accept and process the message.
  • Port type − It is an abstract set of operations mapped to one or more end-points, defining the collection of operations for a binding; the collection of operations, as it is abstract, can be mapped to multiple transports through various bindings.
  • Binding − It is the concrete protocol and data formats for the operations and messages defined for a particular port type.
  • Port − It is a combination of a binding and a network address, providing the target address of the service communication.
  • Service − It is a collection of related end-points encompassing the service definitions in the file; the services map the binding to the port and include any extensible definitions.
More details you can follow this link:-


PortType and operation elements in WSDL with the java equivalences

Service providers and consumers are free to implement their ends of the exchange in any way they want, as long as the actual messages they send match the service definition. The use of service definitions specifying XML message exchanges is what sets web services apart from earlier technologies for distributed programming.

Binding and service elements in WSDL 


WSDL Elements Definition − It is the root element of all WSDL documents.Binding − It is the concrete protocol and data formats for the operations and messages defined for a particular port type. Port − It is a combination of a binding and a network address, providing the target address of the service communication. 


Explain how SOAP is used with HTTP

SOAP is a protocol which is used to interchange data between applications which are built on different programming languages.SOAP is built upon the XML specification and works with the HTTP protocol.This makes it a perfect for usage within web applications. The SOAP building blocks consist of a SOAP Message.



Discuss how SOAP can be used for functional oriented communication?


SOAP ( Simple Object Access Protocol) is a message protocol that allows distributed elements of an application to communicate. SOAP can be carried over a variety of lower-level protocols, including the web-related Hypertext Transfer Protocol (HTTP). SOAP defines a header structure that identifies the actions that various SOAP nodes are expected to take on the message, in addition to a payload structure for carrying information.SOAP is a protocol which is used to interchange data between applications which are built on different programming languages.SOAP is built upon the XML specification and works with the HTTP protocol. This makes it a perfect for usage within web applications.
The SOAP building blocks consist of a SOAP Message.The concept of routing a message through a string of nodes that perform different functions is how SOAP supports things like addressing, security and format-independence. Essentially, the headers identify roles, which in turn provide the SOA features which SOAP then routes to. Stringing messages through a sequence of steps is uncommon in today’s microservice-centric development environments. 

Explain the structure of SOAP message in message oriented communication, indicating the elements used

The SOAP specification establishes a standard message format that consists of an XML document capable of hosting RPC and document-centric data (see Figure 3.19). This facilitates synchronous (request and response) as well as asynchronous (process-driven) data exchange models.SOAP is a communication protocol designed to communicate via Internet. 
The envelope element is the mandatory element in the SOAP message and is used to encapsulate all of the data in the SOAP message. The header element can be used to contain information such as authentication information or the definition of complex data types.


Importance of the SOAP attachments, explaining the MIME header

This document defines a SOAP feature that represents an abstract model for SOAP attachments.It provides the basis for the creation of SOAP bindings that transmit such attachments along with a SOAP envelope, and provides for reference of those attachments from the envelope. 
The MIME stands for Multi-Purpose Internet Mail Extensions. As the name indicates, it is an extension to the Internet email protocol that allows it’s users to exchange different kinds of data files over the Internet such as images, audio, and video. The MIME is required if text in character sets other than ASCII. Virtually all human-written Internet email and a fairly large proportion of automated email is transmitted via SMTP in MIME format. Actually, MIME was designed mainly for SMTP, but the content types defined by MIME standards are important also in communication protocols outside of email, such as HTTP. In 1991, Nathan Borenstein of Bell core proposed to the IETF that SMTP be extended so that Internet (but mainly Web) clients and servers could recognize and handle other kinds of data than ASCII text. As a result, new file types were added to "mail" as a supported Internet Protocol file type.

more details :-


Explain the annotations in JAX-WS, providing examples of their use 


JAX-WS Annotations (JSR 224). Describes the supported JAX-WS annotations and their associated properties. The @Action annotation specifies the WS-addressing action that is associated with a web service operation.

There are two types of web services:
  1. SOAP Web Services
  2. Restful Web Services




How a web service can be tested using different approaches

What is the testing approach towards web services?Testing of web services is one of the important type of software testing approach, which is mainly used to determine the expectations for reliability, functionality, performance.
As these days Automated testing is considered as one of the most trending methodology in the field of software testing, hence testing web apps based on Restful APIs through automation will provide effective test results. Some of the best & popular tools for web services testing are:
  1. Soap UI,
  2. Testing-whiz,
  3. Softest
  4. Test Maker,
  5. Postman, 











No comments:

Post a Comment