Library tutorials & articles

Building a Web Service - The Beginning

XML

The idea that I can describe XML adequately in a couple of paragraphs is ludicrous. The subject is complex enough that books are devoted so just the basic structure and usage. In my opinion, the reason for this difficulty it that XML is both flexible and extensible. So it can be used in almost any situation where data needs to be stored or transferred. Still, I'm brave (or stupid) enough to give a brief definition a try.

My two second description of XML has always been 'comma-delimited files on steroids'. My reason? The purpose of a CSV file is to store information so that another application can read/import it. This works fine, so long as the receiving application is aware of the structure of the incoming file. The best that CSV files can offer in this area is to place field names at the top of each column. So the possibility for problems of interpretation (or at least situations that require programmer-to-programmer discussions) exists. XML improves on this by applying a more rigorously enforced structure to the data. The order in which the data is physically laid out in the document is irrelevant, but each data field is named, so that it is easier to find. And when you combine XML data with DTDs or Schemas, the type and range of data are now subject to validation. Certainly a superior mechanism than CSV files.

For the most part, our use of XML will be to package up the data that needs to be send to the web service for processing and to receive back the results. As such, our XML documents will be relatively straightforward. But your complexity may vary, depending on the solution that you're trying to provide.

Comments

  1. 22 Aug 2006 at 07:46
    Hi everyone, i'm doing a project for job seekers, I don't know much on Java server pages, can anyone provide some support to me by sending me useful links of sample codes. Have great work loads.Thanks, Regards NilzSmiley Face [:)]
  2. 25 Jan 2006 at 06:36
    It is very nice. I feel like I got what I needed, just introduction on Webservices.
    Adding some more examples will do much better.
  3. 12 Jan 2003 at 06:01
    The second part to this article will be published in a few days
  4. 12 Jan 2003 at 02:40
    Very good intro but I am now left wanting more, a link to an example would have been good.
  5. 01 Jan 1999 at 00:00

    This thread is for discussions of Building a Web Service - The Beginning.

Leave a comment

Sign in or Join us (it's free).

Bruce Johnson I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web site...

Related discussion

Related podcasts

  • Introduction to Atlas

    Get your feet wet with an introduction to Atlas. Atlas is the new part of the .NET framework specifically for web clients. Features include AJAX and web services support, new validation controls, behaviors, and an object orientation layer sitting on top of JavaScript.

Events coming up

  • Dec 8

    December Silicon Valley Ruby Meetup

    Moffett Field, United States

    In a World of Middleware, Who Needs Monolithic Applications? by Jon Crosby With Rack emerging as the standard for composing web applications and services, most recently with Rails adoption, an architectural shift is taking place. Learn how to create next generation web services by reusing existing Rack middleware and supplementing with your own components and micro-frameworks like Sinatra. Bio : Jon likes music, the Open Web, Ruby, Erlang, Haskell, Objective-C, JavaScript and coffee.

We'd love to hear what you think! Submit ideas or give us feedback