Home > Articles > Web Services > XML

📄 Contents

  1. A Peek at SOAP
  2. Web Services and Internet 3.0
  3. .NET: How Evil Is It?
This chapter is from the book

This chapter is from the book

Web Services and Internet 3.0

SOAP exists because of an idea called Web services. Web services are new, and there aren't a whole lot of them out there right now. However, they're growing in number daily and have the same potential for explosion that Web pages had back in 1996 (maybe even greater). To get a strong idea of what Web services are, and why they're part of the next phase of the Internet, it's useful to cover a bit of Internet history to get some context.

A Brief History of the Internet

The Internet began as an American military experiment called ARPANET, whose goal was to build an interconnected computer network that could continue to function even if some nodes (that is, some computers) were destroyed or rendered inoperable by, say, a nuclear strike. Clearly, this experiment worked (without having to test exactly what effect a nuclear explosion would have), and ARPANET grew until it became known as the Internet. Most serious geeks knew about it and started playing with something called email, even though everyone at the time knew that phones were more convenient. Some folks have called this Internet 1.0.

Then in 1991, a guy called Tim Berners-Lee came up with a way for Swiss physicists to post their scientific papers on this Internet so they could read each other's papers easily. This idea caught on quickly and bloomed into the World Wide Web. Initially, the Web was used for people to communicate with each other, sharing such things as scientific papers, personal Web sites, marketing sites for companies, and pornography. In the beginning, the Web was mainly a static environment used mostly for person-to-person communication.

As more serious developers started learning about the Web and a new technology called Common Gateway Interface (CGI), they were able to create programs that allowed people to actually accomplish some things over the Web, such as buying books, reserving airline tickets, and transferring money across bank accounts. In this fashion, a large portion of the Web became devoted to people-machine communication and interaction. People interacted with software programs in order to accomplish things. This phase has been called Internet 2.0.

Many people think the next step in using the Internet will involve software applications communicating with each other over the Internet. These programs will use each other's components, modules, and methods in order to accomplish their tasks. For example, you could write a program in Java that does something, but your program needs to get some information that lives on another machine, a remote computer. Your Java app must be able to communicate with this remote machine in order to get its work done. It must be able to ask that computer for the data it needs, and be able to receive and understand that data. The remote machine must be able to listen for your Java app's cry for help, process the request, and return the information in such a way that your Java program can actually read it.

This next use of the Internet that focuses on machine-machine communication has been called Internet 3.0.

So What's a Web Service?

A Web service is the name for a method or function that is available for other applications to access over the Internet. To use a classic example, say that you have a program that needs to find out the latest stock price for a certain company, and that information lives on another computer. This remote computer has been configured in such a way that if you send it a request for a stock price, it will respond with that company's current price. In this case, the remote computer is hosting a Web service. It's just a method or function that can be accessed by other programs over the Web.

Another way to look at it: When people want some information, they look for certain Web pages and get that information in HTML form. When applications want information, they look for certain Web services and get that information by requesting it from another computer.

People receive Web pages in the form of Hypertext Markup Language (HTML). Computers receive information from Web services in the form of SOAP. SOAP is HTML for computer-computer interaction over the Web.

The goal of Web services is a seamless integration of services across the hardware and software barriers that exist on the Internet. In this system, much of the Internet could become repackaging of other bits and pieces out there.

Money and Web Services

Why would you bother to write a Web service? The story to get developers such as yourself onto the Web services wagon is that you could write a Web service, expose it to the world, and then charge people who used your Web service, either on a per-use basis or subscription basis. It's certainly an appealing idea: Write something brilliant, even a small thing, and people will flock to you to use your program and drive truckloads of cash to your front door. This has not actually happened yet, but honestly, the potential is there. The next few years will be interesting.

Evolution from Software to Services

Right now, the idea of software is that of a discrete process. A consumer buys a shrink-wrapped package with a manual and a CD. They install the CD's program on their machine, and it runs without anyone else on the planet knowing about it. Then the person usually "loans" the CD to someone who asks nicely.

In the Web services view of the world, this process disappears. Instead, you buy access to a Web service for a certain amount of time. For example, instead of buying Word at the store, you'll buy the access rights from Microsoft for, say, a year. You download some components from the Microsoft Web site, but otherwise, your Word program mostly lives on some server at Microsoft. If Word needs to be updated, Microsoft simply upgrades the program on their server, and your program is updated without your even being aware of it. This upgrade is free for you—it's part of the subscription price. After a year, you must renew your subscription.

Notice you don't have a CD to loan to anyone else. Part of the push for Web services is that they will cut down substantially on software piracy (at least for a while, anyway). With less piracy, more people will actually have to buy software, and software companies will make more money.

Though this probably rankles some of you, this has aspects of fairness to it—you pay for what you use. Most of us more or less adhere to the philosophy of using something for free if you're using it to learn, but paying for it once you're using the software in a way that makes money for you.

And this is one big reason why Microsoft is putting so much of their weight behind Web services and making it easy for developers (and themselves) to create Web services: In the long run, they think they will make more money.

Requirements for Web Services

Initially, a lot of people will be experimenting with creating their own Web services, and many of those services will break from time to time. However, if you want your Web service to be used by anyone who will actually pay money for it, there are some things you must remember. Your Web service:

  • Must be 100% reliable. It must always work, and always work in the same way.

  • Can also use other Web services, which means that everything must be working or a whole chain of services could go down.

  • Must be extremely available—that is, highly scalable and always on.

  • Must be able to handle unexpected inputs (usually returning a fault is adequate).

  • Must not affect the availability of any other Web service, even if those Web services share common components.

  • Must be secured so that only authorized systems and users can use it.

That's a high-level look at what will be required of Web services in order to become used and (hopefully) profitable.

From a more granular point of view, what do Web services need in order to be able to communicate with each other and announce themselves to the world? Here's a list of some other requirements. We'll go into more detail about these later (actually, the whole book is devoted to understanding how the following requirements are implemented, so don't worry if the list below isn't 100% clear; it will be).

  • A standard way to represent data, so the services know what to look for.

  • A common, extensible message format.

  • A common, extensible service description language.

  • A way to discover services located on a particular Web site.

  • A way to discover service providers.

Some Concerns about Web Services

Famed software interface guy Bruce "Tog" Tognazinni recently exposed a potential abuse of Web services. He signed up with a digital TV recording service (ReplayTV), and one of the reasons he signed up was because he could record TV without the commercials. He paid the subscription price and received the service. Partway into the year he signed up for, the company changed its service, and he could no longer record without commercials. Essentially, he paid for a service that was now significantly less valuable to him, and there was nothing he could do about it.

ReplayTV has since changed their policy and reverted back to their original functionality, but this raises a legitimate concern: How well do you trust the company that is providing a Web service? In an exaggerated example, suppose you're using a Microsoft Web service to use Word, and one day they decide they don't like Word anymore and you find the only thing the program does is run Tetris.

As with many other aspects of Web services, we'll have to see how this issue plays itself out. I can already picture attorneys wringing their hands in happy anticipation of conflict.

Finding Web Services

We'll cover this in more detail later, but much work has been done to define exactly how someone can locate a Web service they need, how they can find out what sort of input parameters that Web service needs, and how to structure those parameters. The current plan is for all Web services to register in a big list called the Universal Discovery, Description and Integration Registry (UDDI Registry). Inside this registry you'll find all the information you need to connect to and interact with a particular Web service. We'll cover this in more detail in Chapter 6, when we cover UDDI.

Once you find the Web service you want to use, your application will also have to know what sort of information to pass to this Web service. A whole new language called, appropriately, Web Services Description Language (WSDL) is being developed that spells out exactly what sort of information a Web service needs in order to work.

Web Services and RPC

The request-response form of communication between a local computer and a remote one is often called a Remote Procedure Call (RPC), because it involves a program invoking a method, or function, that lives on a remote computer. RPC is not new—people have been doing it for about 20 years in one form or another. Sun Microsystems is usually given credit for being the first to create a generic way for applications to call methods on remote machines.

This method of software applications talking to each other over the Internet, machine-to-machine communication, will likely be the next big use of the Web, and may surpass all others in significance. Will it actually happen? Probably—many developers are excited by the idea, and incidentally, Microsoft has bet the company's future that it will.

This kind of system is also known as "distributed." That is, the system is distributed over several computers. It could be said that part of your application lives in a separate place (even though you can also say that your application is simply calling another application). In any case, this is known as a distributed architecture.

A view of how this works is illustrated in Figure 1–1.

Figure 1-1FIGURE 1–1 A Web service using SOAP

In this scenario, your application wants some information that lives on a remote computer somewhere.

  1. Your application sends out a request for data, and the first stop on its journey is the SOAP client (which might also live on your computer).

  2. This SOAP client takes in the request for data and translates the parameters into a SOAP message, like we saw at the beginning of the chapter.

  3. The client then sends this SOAP message on its way to the remote computer, which has a SOAP server running at all times, listening for incoming SOAP messages.

  4. The job of this SOAP server is to listen for SOAP messages, take the input data in those SOAP messages, and translate it into something the remote method can understand.

  5. It then passes the input data to the remote method.

  6. The method does its thing and comes up with some data.

  7. This data is given back to the SOAP server.

  8. The SOAP server then acts as a SOAP client, in that it takes the returned data and turns it back into SOAP.

  9. It then sends this response back to the original SOAP client on your computer.

  10. Your SOAP client then translates the SOAP data into something your application can understand.

  11. And finally, your application gets the data it needs in a form it can understand.

A vital facet of Web services is that it doesn't matter what platform the requesting or responding computer is. It could be a Mac calling a method on a Linux box, or a Palm requesting something from a Windows machine. Not only do Web services not care about platforms, they don't even know. This is like the Web: When you download a Web page, do you know what kind of server that it came from? Not without doing a little research. And really, you don't care—you just want your Web page. Web services have a similar goal and so must be platform-independent.

Web services take this concept one step further—they don't even care what language the remote methods are in. C# can talk to Perl, which can talk to Python, which can talk to PHP, which can talk to a really fast guy with an abacus. It doesn't matter. The only thing these programs need to have in common is their ability to read and write SOAP messages. Some of you may remember when people were trying to make a new language called Esperanto, a language that everyone on the planet would learn to speak and read so everyone would be able to talk to each other. It failed miserably. Fortunately, computers are more malleable than people, and we can force computers to all speak the same language, and that language can be SOAP.

Transparency and Plumbing

A Web service using SOAP is an example of a loosely connected application. Connections are said to be tight or loose. The looser the connection is, the less one application knows about the other. Web services are very loose—methods only know what other methods do, not what platform they're on or even what language they're written in. Loose connections generally go through an intermediate step. In the case of Web services, SOAP is this intermediate step.

The details of the connections between applications are known as plumbing. The tighter a connection, the more you, the programmer, must know about plumbing. Plumbing is usually a pain, and most developers avoid it if possible. That may be one reason why connections have become looser and looser over the years: No one wants to program plumbing.

Looser connections generally provide more flexibility for developers.

Support for Web Services

Companies like Microsoft, Oracle, IBM, Hewlett-Packard and Sun are running to create their own Web services. In fact, that's what Microsoft's HailStorm project is: a bunch of Web services.

Part of the Web services plan is for people never to install software on their computers, but instead just access the programs over the Internet. For now, "Web services" just means invoking methods over the Internet: My computer makes your computer run a little program for me and return the results.

You can create Web services right now. You don't need to wait for anyone, including Microsoft. This is important: .NET is not necessary to create a fully functional Web service. Some .NET tools (like Visual Studio.NET) are designed to make it easy to create Web services, but that's it—no one, not you or anyone, has to go through Microsoft to create or use Web services.

In general, it's expected that a number of individual developers will slowly start experimenting and creating their own Web services until some sort of critical mass is reached. At that point, an explosion of Web services is expected to arise as businesses eventually decide that Web services are a solid technology to invest IT capital in.

Why SOAP Is Needed

Now, as developers became more sophisticated in both their skills and needs, they became frustrated with some parts of the Web. It's not because their dot-coms sank beneath the waves along with their dreams of IPOs, but because of the inherent limitations of HTML. Right now, the easiest way to get information from another computer is to request a Web page, and this Web page usually appears in HTML form. It's almost impossible for an application to figure out what the important pieces of data are in an HTML file. After all, HTML is mostly a bunch of formatting tags: bold, italic, table cells, and so on. Here's one way to look at it: HTML isn't information, it's just a picture of information. That's one reason why HTML works so well for people and so poorly for machines. By and large, we see in pictures, but computer programs need consistent, predictable structure in order to make sense of the world. Thus, computers need something other than HTML to talk to each other.

You may remember from earlier in the chapter that we discussed some of the requirements for a Web service. Two of them were:

  • A standard way to represent data, so the services know what to look for.

  • A common, extensible message format.

SOAP provides the answer to these two requirements. More precisely, XML provides a standard way to represent data, and SOAP provides an extensible message format ("extensible" essentially means you can make up your own tags; for example, HTML is not extensible).

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020