THE STRUCTURE AND COMPONENTS OF SOAP-BASED WEB SERVICES – Develop Java Web Services to Access Databases

9.2   THE STRUCTURE AND COMPONENTS OF SOAP-BASED WEB SERVICES

To effectively find, identify and return the target information required by computer programs, a

SOAP-based Web Service needs the following components:

1) XML (Extensible Markup Language)

2) SOAP (Simple Object Access Protocol)

3) UDDI (Universal Description, Discovery and Integration)

4) WSDL (Web Services Description Language)

The functionality of each component is listed in the following.

XML is a text-based data storage language and uses a series of tags to define and store data. That is, tags are used to mark up data to be exchanged between applications. The marked-up data then can be recognized and used by different applications without any problem. As you know, the Web Services platform is XML + HTTP, and the HTTP protocol is the most popular Internet protocol. However, XML provides a kind of language that can be used between different platforms and pro-gramming languages to express complex messages and functions. In order to make the code used in Web Services be recognized by applications developed in different platforms and programming languages, XML is used for coding in Web Services.

SOAP is a communication protocol used for communications between applications. Essentially, SOAP is a simple XML-based protocol to help applications developed in different platforms and languages exchange information over HTTP. Therefore, SOAP is a platform-independent and language-independent protocol, which means that it can be run on any operating system with any programming language. That is, SOAP works as a carrier to transfer data or requests between appli-cations. Whenever a request is made to the Web server to request a Web Service, that request is first wrapped in a SOAP message and sent over the Internet to the Web server. Similarly, when the Web Service returns the target information to the client, the returned information is also wrapped in a SOAP message and sent over the Internet to the client browser.

WSDL is an XML-based language for describing Web Services and how to access them. In WSDL terminology, each Web Service is defined as an abstract endpoint or port, and each Web method is defined as an abstract operation. Each operation or method can contain SOAP messages to be transferred between applications. Each message is constructed by using the SOAP protocol when a request is made from the client. WSDL defines two styles for how a Web Service method can be formatted in a SOAP message: a remote procedure call (RPC) and document. Both RPC- and document-style messages can be used to communicate with a Web Service using a RPC.

A single endpoint can contain a group of Web methods, and that group of methods can be defined as an abstract set of operations called a port type. Therefore, WSDL is an XML format for describing network services as a set of endpoints operating on SOAP messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly and then bound to a concrete network protocol and message format to define an endpoint.

UDDI is an XML-based directory for businesses to list themselves on the Internet, and the goal of this directory is to enable companies to find one another on the Web and make their systems interoperable for e-commerce. UDDI is often likened to a telephone book’s yellow or white pages. By using those pages, it allows businesses to list themselves by name, product, location or the Web services they offer.

FIGURE 9.2   A typical process of a SOAP-based Web Service.

In summary, based on these components and their roles, we can conclude:

  • XML is used to tag data to be transferred between applications
  • SOAP is used to wrap data tagged in XML format in messages represented by the SOAP protocol
  • WSDL is used to map a concrete network protocol and message format to an abstract end-point and describe the Web services available in WSDL document format
  • UDDI is used to list all Web Services that are available to users and businesses.
  • Figure 9.2 illustrates these components and their roles in a Java Web Service process.

Now we have fundamental knowledge about SOAP-based Web Services and their components.

Next let’s see how to build a Web Service project.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *