BYTE.com
RSS feed

Newsletter
Free E-mail Newsletter from BYTE.com
Email Address
First Name
Last Name




 
    
             
BYTE.com > Features > 1999 > August

Anatomy Of An XML-RPC Transaction

By Jon Udell

August 30, 1999

(Exploring XML-RPC :  Page 4 of 5 )



In this Article
Exploring XML-RPC
Web components 101
The XML Dimension
Anatomy Of An XML-RPC Transaction
DCOM? CORBA? RMI? Why Not Just XML-RPC?
An XML-RPC request can be as easily read and written by a human as

by a program. That's one of the great features of all Internet

software: the protocols (HTTP, SMTP, NNTP) are text-based and

therefore easy to understand and to manipulate in any programming

language.

Of course, that's also true for ordinary scripted CGI work, such as

our mindshare-measuring script. What's special about XML-RPC? Well,

consider the response that comes back when you send the wrong password

to the MailToTheFuture service using the normal CGI interface:

"Sorry! There was an error: Can't send you the cookie for 'yourname@yourmailhost.com' because the password is incorrect."

You can certainly teach your script to recognize and deal with

these kinds of responses, but it's going to be a fragile mechanism.

You're relying on free-form text patterns and, when they change, your

script will break. In the case of our mindshare-measuring script, for

example, a page redesign at either Yahoo or Alta Vista will very

likely force the script to have to recognize new patterns in the

output from these components.

Now consider the response that comes back from MailToTheFuture's

XML-RPC interface when you send the wrong password:

<?xml version="1.0"?>

<methodResponse>

<fault>

<value>

<struct>

<member>

<name>faultCode</name>

<value>

<int>4</int>

</value>

</member>

<member>

<name>faultString</name>

<value>

<string>The password is incorrect.</string>

</value>

</member>

</struct>

</value>

</fault>

</methodResponse>

Like the request, this response is well-formed -- and thus

automatically parseable -- XML.

Previous page Page 4 of 5 Next page


BYTE.com > Features > 1999 > August
Dr. Dobb's Media Center
BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE: Volume 2 - Heuristic Algorithms
The Best of BYTE: Volume 2 - Heuristic Algorithms
In this volume of Best of BYTE, we explore the emergence of some heuristic algorithms. Although we have only scratched the surface of this intriguing subject, we hope we've suggested the potential of the synthesis of heuristics and algorithms.

© 2008 Think Services, Privacy Policy, Terms of Service, United Business Media Limited
Site comments: webmaster@byte.com
Web Sites: BYTE.com, dotnetjunkies.com, Dr. Dobb's Journal, SD Expo, Sys Admin, sqljunkies.com, Unixreview



MarketPlace
Fast online exception analysis. Capture customer crash data online.
Develop 10 times faster ! ALM, IDE, .Net, RAD, 5GL, Database, 5GL, 64-bit, etc. Free Express version
Easily create an automated, repeatable process for building and deploying software.
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.
Develop distributed systems conforming to open standards like CORBA and Web Services faster with SANKHYA Varadhi - The Digital Bridge.
Wanna see your ad here?
 

web2