Special Edition Using SOAP

Special Edition Using SOAP

by John Paul Mueller
     
 

This book will introduce the reader to SOAP and serve as a comprehensive reference to both experienced and new developers in the area. Only one other book completely dedicated to SOAP is currently on the market, and it has strong sales because no other information is available. SE Using SOAP will capture more readers than the competition because it provides

Overview

This book will introduce the reader to SOAP and serve as a comprehensive reference to both experienced and new developers in the area. Only one other book completely dedicated to SOAP is currently on the market, and it has strong sales because no other information is available. SE Using SOAP will capture more readers than the competition because it provides real-world examples and troubleshooting with complete data conversion information. The emphasis will be on getting started fast instead of reading through white paper-style theory in hopes of finding applicable information. By reading this book and working through the examples, the reader will be well versed in SOAP and its applications immediately. SE Using SOAP includes difficult to find information on how SOAP works with different languages and protocols including Visual Basic.NET, Visual Basic 6, C#, XML, HTTP, SDL, DISCO, COM, SQL Server, plus much more. Also covers how to work with PDAs, an ever-growing need in the data transfer market.

Product Details

ISBN-13:
9780789725660
Publisher:
Que
Publication date:
09/28/2001
Series:
Special Edition Using Series
Pages:
436
Product dimensions:
7.24(w) x 9.05(h) x 1.26(d)

Read an Excerpt

Chapter 1: An Overview of SOAP

At one time in the history of the PC, computing consisted of a single computer using simple applications that relied only on local resources. Eventually, networking changed the way people shared expensive peripherals and data, but the data was still, to an extent, stored locally. As companies grew and became more dependent on the PC, the concept of the Local Area Network (LAN) gave way to the Metro Area Network (MAN) and Wide Area Network (WAN). The client/server architecture of days gone by allowed a limited form of distributed computing. However, there was still a direct connection and all of the data appeared within the confines of one company, so sharing data was still relatively easy.

Today, computing is all about distributed applications running on machines that may not know anything about each other. Data is no longer restricted to one company; business-to-business communication is now the norm. Consequently, these machines may not even have a direct connection or access the network at the same time. Data sharing occurs between individuals who may not ever meet. In short, there isn't a direct connection between the provider and the user of data anymore, which means the rules used in the past don't work well for modern communication needs.

Early computers relied on protocols (predefined rules) that ensured safe data transfer between machines that knew what to expect from each other. These protocols work fine on a LAN, MAN, or WAN because there's a direct connection between machines. A protocol designed for the LAN environment, however, may run into problems when dealing with something like the Internet. For example, the protocol may expect to find another Windows machine when the client really needs to communicate with a Unix server. That's precisely what's happened and why we need a new protocol named Simple Object Access Protocol (SOAP). The fact that you're reading this book means that you already have some idea of why you need SOAP and may even know something about it from a technical perspective.

The first section of this chapter is going to tell you more about SOAP-what it does and how it works. This section isn't going to provide many details, but it will prepare you for the detailed discussion in Chapter 2. I want to present a basic overview of the technology before jumping into the details. SOAP is different from older protocols. It provides some features these older protocols don't have. For example, unlike Distributed Component Object Model (DCOM) and other binary protocols, SOAP won't interfere with the operation of the firewall on your Web server. It uses a plain text transfer method that firewalls readily accept. This means that you can maintain the integrity of your company's Web site, and still get the data you need.

Some of these neat new features come at a cost. You lose some of the features provided by the older protocols. For example, security is an issue that many SOAP developers are trying to address as of this writing. The second section of the chapter provides a brief comparison of SOAP to older protocols, such as DCOM and Common Object Request Broker Architecture (CORBA). You'll learn how SOAP excels and where it provides less than stellar results.

SOAP actually interacts with other Web technologies that you may have used in the past. Although SOAP can theoretically rely on any transport protocol, the current toolkit from Microsoft uses the same Hypertext Transfer Protocol (HTTP) used to move Web pages across the Internet. (Note that you can use any reliable protocol to transfer SOAP messages-HTTP is simply the most straightforward and easily accessible method right now, so developers are using it.) In addition, SOAP relies on the eXtensible Markup Language (XML) to format data before moving it from one point to another. The third section of the chapter discusses the interaction between these three technologies.

As previously mentioned, Microsoft designed SOAP to address specific problems. Technologies such as DCOM just can't make the grade in the distributed computing environment of the Internet. The fourth section of the chapter discusses these problems in detail and explains how SOAP addresses them.

SOAP changes the performance picture-it uses a new technique to transfer data, so differences in performance are expected. In many cases, SOAP is slower than older technologies like DCOM. You can't beat a direct binary connection between client and server that relies on optimized data transfers. However, given the distributed nature of applications today, there are also situations when SOAP is faster than binary technologies. In the fifth section of the chapter, we'll talk about SOAP performance issues. This section also talks about ways of mitigating some of those performance losses by using better coding techniques.

Microsoft designed SOAP to work with the Internet-which means you'll eventually run into a Web server. The sixth section of the chapter discusses how SOAP works with a Web server to handle client requests. We'll talk about some of the mechanics you'll need to know later, like common storage locations for files and some of the implementation details.

The final section of the chapter discusses a topic that many of you will ask about once you see everything required to move to SOAP It's important to know why this move is so important and how you'll benefit from it. SOAP is a great technology with a very important purpose for your company. This section discusses why you need to include SOAP in your programming toolbox.

What Is SOAP?

SOAP is a lightweight communication protocol based on the eXtensible Markup Language (XML). It allows applications and components to exchange data. As mentioned in the introduction, SOAP currently relies on HTTP as a transport protocol, but could use any reliable transport protocol to transfer data. In addition, SOAP is useful for many data transfer needs, including LANs, WANs, and MANS-it's not just for the Internet.

Note

Learning XML is an essential part of learning SOAP. You don't have to become an XML guru, but knowing the basics is a requirement. Many XML Web sites offer tutorials and other information about this technology. For example, DevelopMentor (http://www.develop.com/dm/dev_resources.asp) provides good tutorials on this and other distributed application topics from a Microsoft perspective. W3Schools (http://www.w3schools.com/ xml/) provides detailed tutorials in small segments. Another good place to look for XML training is Courses in XML by QTrain (http://www.qtrain.net/). Once you finish the basic XML tutorials, you'll want to visit XSLT.com (http://xslt.com/resources_tutorials.htm) and learn more about data transformation techniques. ZVON.org (http://www.zvon.org/index.php?nav_id=2) includes tutorials on both XML namespaces and the eXtensible Stytesheet Language Transformations (XSLT).
Despite what you may have heard, SOAP isn't another conspiracy by Microsoft to take over the worldit's a protocol supported by many vendors. Some of the most notable contributors to SOAP are Ariba, Commerce One, Compaq, DevelopMentor, HP, IBM, IONA, Lotus, SAP, and UserLand. Vendors who support SOAP hope it will eventually gain standards status. The World Wide Web Consortium (W3C) is currently discussing SOAP You can read the W3C comments at http://www.w3.org/Submission/2000/05/Comment and see the initial specification at http://www.w3.org/TR/SOAP/.

Since SOAP is a new protocol that isn't tied to a particular operating system, the vendors working on it are free to add features that make SOAP especially suited to distributed application use. Three of the features that make SOAP attractive are:

  • No ties to existing component technologies-SOAP will theoretically work with any platform.
  • No ties to a particular programming language; you can use SOAP with any language capable of outputting text. (You can also use a special toolkit to output the formatted text as well, seen in Chapter 4.)
  • Easy to learn and simple to extend.
You'll see as the book progresses that these three points are important because they'll affect your perception of SOAP as an application solution. For example, the fact that vendors haven tied SOAP to a particular programming language means that you'll very likely see a wealth of toolkits on the market. These toolkits may not all produce compatible code. In addition, they may rely on server or client-side components that aren't compatible with other SOAP implementations. Problems like these will become less noticeable as SOAP nears standardization.

The last point is important as well. SOAP really is easy to learn. It's verbose, which means that some of the code listings you see become quite long and look complicated, but the underlying technology is simple. The complexity that you'll see as we work with SOAP throughout the book comes from the various extensions that Microsoft and other vendors add. These extensions provide additional flexibility and allow you to tailor a SOAP implementation to specific needs.

Note

SOAP is a very hot topic right now because it offers so much. However, getting the latest news can prove difficult because the specifications change so quickly. You can usually rely on news Web sites and newsgroups to provide updated information on a regular basis. For example, the SOAP News Web site at http://soap.weblogs.com/ provides up to the minute information about this new standard. DevelopMentor and other organization! provide fist servers that discuss SOAP. The main public SOAP newsgroups appear on the...

Meet the Author

John Mueller is the owner of DataCon Services, a programming and design consulting business that also provides client software and programming training. He is also a freelance author and technical editor with 29 books and almost 200 magazine articles under his belt. The topics range from networking to Web development and from Windows programming to artificial intelligence.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >