Defining SOAP XML

In today's business scenario, the need for exchanging data over a network has increased significantly. A simple business solution involves huge amounts of data to be transferred. Consider the Web site http://www.wisdomjobs.com/ of the bookstore Some BookStore, Inc. The http://www.wisdomjobs.com/ Web site picks up data from the Web sites of each of its publishers. As a result, the data of the books published is stored in the data source of each publisher. This implies that data can be present in any format on computers running in different environments.

SomeBookStore, Inc. plans to integrate the data from each of its publishers. When a user searches for a book on the Web site of SomeBookStore, Inc., the site will match the search conditions with the data present on http://www.wisdomjobs.com/. However, integrating data that is present on remote computers is not an easy task. It requires you to create huge data sources on the servers of SomeBookStore, Inc., which, in turn, will prove to be expensive.

The situation could be worse if a publisher's Web site had firewalls for security purposes. As a result, it would be better if SomeBookStore, Inc. extracted data from the site of publishers instead of integrating data on their servers. This discovery led to a need for a standard protocol that could be used to extract data from an application present on a remote computer. As a result, SOAP was developed.

As discussed earlier, SOAP is the protocol that applications use to communicate in a distributed environment. This implies that SOAP can be used to request information on a network. Because SOAP uses XML, a request can be made from one computer to another computer running on a different operating system. The response of the request is sent back to the requesting application in the form of a SOAP message. Therefore, SOAP is considered a protocol based on the request-response format, as shown in Figure. You will learn about the SOAP package in the later section "Architecture of SOAP."

The SOAP Protocol

The SOAP Protocol

The following list discusses the advantages of SOAP:

  • All big vendors, including Microsoft and Sun Microsystems, support the Web services model that uses SOAP. In addition, SOAP is a widely accepted protocol for transferring data between distributed applications that are created using all recent programming languages. These languages include Visual C#, Visual Basic .NET, Perl, Java, Python, and so on.
  • The Web services model is based on the Web infrastructure; therefore, you do not need to re-create the infrastructure.
  • SOAP supports XML, which makes the interacting applications interoperable because XML transfers data in text format. The data is self-describing; therefore, the receiving applications can interpret it easily. This implies that SOAP can be used to exchange data between applications created using any programming language and deployed on a computer running on different platforms.
  • SOAP messages can overcome firewalls. SOAP messages can use HTTP to exchange information. HTTP messages can pass through firewalls, allowing easy transfer of data.
  • SOAP uses XML that enables you to transfer heavy and complicated data easily by encoding the data.
  • Data that is transferred using SOAP is secure. SOAP extends support to several protocols, such as FTP and HTTP. Therefore, data that is transferred using SOAP can be encrypted using HTTP standards and transmitted using HTTP security methods.

In addition to the advantages of using SOAP, SOAP has certain limitations. The following list discusses the limitations of using SOAP with Web services.

  • As discussed earlier, you can transfer only packaged data by using SOAP. Therefore, while sending data across the network with SOAP, you first need to package the data in the form of a SOAP package. This package includes the SOAP request and the message that needs to be transferred.

When the request reaches the provider application, the application sends an acknowledgement to the requesting application. In addition, the data in the form of an XML message is passed to the requesting application. Therefore, the requesting application needs to parse the XML message by using XML parsers and then extract the required information from the data that is transferred. All this requires extensive coding at the developer's end. The process of transferring data by using SOAP is shown in Figure. You will learn about the processing of SOAP messages in the later section "Processing of SOAP Messages."

Process of Transferring Data using SOAP.

Process of Transferring Data using SOAP.

  • XML documents along with DTDs and schema documents require huge memory and CPU requirements. This is mainly because developing and parsing XML documents require huge memory allocation and are time-consuming. In addition, when data is transferred as a SOAP package, the actual XML data forms just a small part of the package. Therefore, in network transactions that are sensitive to performance issues, transferring data by using SOAP can be an overhead.
  • SOAP does not allow you to check for errors at the time of compiling the document. You can only test for errors at run time.
  • Organizations communicating by using Web services need to mutually agree on the standard issues that are defined in the XML schemas. For example, consider a situation where you choose a format for depicting the monthly sales figures of your organization. In this case, your customer can choose the same format of the sales report to depict the yearly sales of their organization. To avoid such a situation, you and your customer need to mutually agree on the definition of sales report. However, in most real-life situations, it is unlikely for all business organizations to agree on a single schema definition.

Despite the previously mentioned limitations, SOAP is a commonly used protocol for transferring data across applications.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML Topics