Eclipse Web Tools Platform: Developing Java Web Applications by Naci Dai, Lawrence Mandel, Arthur Ryman
Purchase From
more options...
  • Barnes & Noble
  • Chapters/Indigo
  • Safari Books Online

Chapter 10 - Web Services

-Lewis Carroll

"When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean-neither more nor less."

Web pages are a wonderful source of information, but it takes a human to understand what they mean. Wouldn't it be great if all the information on the Web was available in a form that could be easily used by other programs? Think of the amazing applications that you could build.

In the early days of the Web, application developers tried to programmatically mine information from Web pages by screen scraping, a technique where HTML is parsed and its meaning is inferred based on assumptions about page layout, table headings, and other clues. Of course, screen scraping is a lost cause because Web designers change page layout frequently to keep their sites interesting.

The best way to make your information available to other programs on the Web is to publish it in XML format. To implement this approach, you'll have to either define an XML vocabulary that describes your application data or use an industry standard vocabulary if a suitable one exists. Indeed the predominant activity following the publication of the XML specification was the definition of standard vocabularies such as Mathematical Markup Language (MathML), Chemical Markup Language (CML), and even Meat and Poultry Markup Language (mpXML)!

Although XML was initially touted as a "better HTML," it soon became apparent that the real sweet spot for XML was as a data interchange format. The term Web service was coined to describe a Web application that exchanged information in XML format. The combination of HTTP and XML was extremely potent. HTTP had become ubiquitous on the Internet. Firewalls allowed HTTP traffic on port 80 to pass through while other protocols and ports were shut out. XML was textual and architecturally neutral so there was no confusion about lowlevel details such as the order of bytes in an integer. Although more verbose than binary formats, XML became universally supported. All platforms had XML parsers. At last there was a protocol, HTTP, and a format, XML, that applications on any platform could use to communicate. Web services became the lingua franca for application integration over the Internet.


This is only a preview.
Read more sample content | Purchase Eclipse Web Tools Platform

Other Sections in This Chapter

  • WSDL
  • SOAP
  • REST
  • REST Style Web Services
  • Overview of Iterations
  • Iteration 1: Developing Web Services Top-Down
    • XSD
    • WSDL
    • Deploying Web Services
    • Implementing the Web Service
    • Testing with the Web Services Explorer
    • Summary of Iteration 1
  • Iteration 2: Developing Web Services Bottom-Up
    • Develop the Java Service Implementation
    • Deploy the Service
    • Summary of Iteration 2
  • Iteration 3: Generating Web Service Client Proxies
    • Generate a Java Client Proxy and JSP Test Client
    • Using the JSP Test Client
    • Summary of Iteration 3
  • Iteration 4: Testing Web Services for Interoperability
    • Checking Messages for WS-I Compliance
    • Summary of Iteration 4
  • Iteration 5: Using Web Services in Web Applications
    • Generate the Query Web Service Client
    • Create the Servlets
    • Import the User Interface Code
    • Test the User Interface
    • Summary of Iteration 5
  • Iteration 6: Discovering and Publishing Web Services
    • UDDI
    • WSIL
    • Summary of Iteration 6
  • Summary