[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Categories of Web Service messages: data-oriented vs action-oriented

  • To: xml-dev@l...
  • Subject: Categories of Web Service messages: data-oriented vs action-oriented
  • From: "Roger L. Costello" <costello@m...>
  • Date: Mon, 04 Feb 2002 14:45:21 -0500
  • Cc: costello@m...
  • Organization: The MITRE Corporation

data oriented services

Subject: Approaches to designing XML messages

I have convinced myself that there are two fundamentally different
approaches to designing Web service XML messages.  They are:

1. The data-oriented approach

2. The action-oriented approach

I believe that which approach a person takes will have serious
implications on the nature of Web services.

Below I elaborate upon each approach.  Before doing so, however, I
present the 3 questions that I have:

a. Has someone already articulated the two approaches?

b. What are the pros/cons of the two approaches, especially as applied
to Web services?

c. Intuitively, I think that the data-oriented approach is the right
approach.  I believe that XML messages should not be simply procedure
calls disguished in XML (which is how I see the action-oriented
approach). Data-oriented XML messages requires a different mindset, and
will result in a different way of building Web services.  However, I do
not have clarity on how to create services that are data-oriented. 
After all, isn't the purpose of a service is to "do some action"?  Can
you provide clarity?


1. The data-oriented XML message approach

With this approach a message is simply comprised of data.  The tags
denote data, not actions.   For example, below is an XML message that is
to be sent to a travel agent service: 

<itinerary>
    <departureInfo>
        <departingCity>Boston</departingCity>
        <destination>Washington, D.C.</destination>
        <departureDate>2002-2-4</departureDate>
        <departureTime>late afternoon</departureTime>
        <seatPreference>aisle</seatPreference>
    </departureInfo>
    <returnInfo>
        <departingCity>Washington, D.C.</departingCity>
        <destination>Boston</destination>
        <departureDate>2002-2-10</departureDate>
        <departureTime>mid morning</departureTime>
        <seatPreference/>
    </returnInfo>
</itinerary>

Notice that this XML message just contains data about a person's
itinerary.  Since this is simply data, not targeted to any particular
application, I can imagine that it could be used by a variety of Web
services, not just a travel agent service.

2. The action-oriented XML message approach

With this approach a message is basically a procedure call disguised in
XML:

<getFlights>  
    <departureInfo>
        <departingCity>Boston</departingCity>
        <destination>Washington, D.C.</destination>
        <departureDate>2002-2-4</departureDate>
        <departureTime>late afternoon</departureTime>
        <seatPreference>aisle</seatPreference>
    </departureInfo>
    <returnInfo>
        <departingCity>Washington, D.C.</departingCity>
        <destination>Boston</destination>
        <departureDate>2002-2-10</departureDate>
        <departureTime>mid morning</departureTime>
        <seatPreference/>
    </returnInfo>
</getFlights>

This XML message is identical to the earlier XML message except for the
root element.  The root element implies action.  The root element is
directly correlated to a method name.  Its child elements are the
parameters.  

I contend that this action-oriented root element gives the message a
very different feel.  I contend that it tightly couples the message to a
particular kind of service - one that returns flight information.  The
data-oriented approach, on the other hand, is not coupled to any
service, so it could be used by a variety of services.

I appreciate any clarity you can bring to this topic.  /Roger


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.