XML-RPC.ComUserLand
    Simple cross-platform distributed computing, based on the standards of the Internet.

Home

Spec

Discuss

Mail List

Topics

New Topic

Top 50




Members
Join Now
Login

XML-RPC validation suite

Posted by Dave Winer, 5/29/00 at 7:48:33 PM.

Overview

This page documents a set of XML-RPC calls that comprise a first validation suite.

Along with the documentation there a client app that calls each of these handlers on a machine whose domain name, port and path you enter into a form. It checks the results that the handlers return, if your server passes all the tests you should let us know in a posting on the XML-RPC mail list or discussion group.

The Frontier source for a server that validates according to this spec is here.

validator1.arrayOfStructsTest (array) returns number

This handler takes a single parameter, an array of structs, each of which contains at least three elements named moe, larry and curly, all <i4>s. Your handler must add all the struct elements named curly and return the result.

validator1.countTheEntities (string) returns struct

This handler takes a single parameter, a string, that contains any number of predefined entities, namely <, >, &, ' and ".

Your handler must return a struct that contains five fields, all numbers: ctLeftAngleBrackets, ctRightAngleBrackets, ctAmpersands, ctApostrophes, ctQuotes.

To validate, the numbers must be correct.

validator1.easyStructTest (struct) returns number

This handler takes a single parameter, a struct, containing at least three elements named moe, larry and curly, all <i4>s. Your handler must add the three numbers and return the result.

validator1.echoStructTest (struct) returns struct

This handler takes a single parameter, a struct. Your handler must return the struct.

validator1.manyTypesTest (number, boolean, string, double, dateTime, base64) returns array

This handler takes six parameters, and returns an array containing all the parameters.

validator1.moderateSizeArrayCheck (array) returns string

This handler takes a single parameter, which is an array containing between 100 and 200 elements. Each of the items is a string, your handler must return a string containing the concatenated text of the first and last elements.

validator1.nestedStructTest (struct) returns number

This handler takes a single parameter, a struct, that models a daily calendar. At the top level, there is one struct for each year. Each year is broken down into months, and months into days. Most of the days are empty in the struct you receive, but the entry for April 1, 2000 contains a least three elements named moe, larry and curly, all <i4>s. Your handler must add the three numbers and return the result.

Ken MacLeod: "This description isn't clear, I expected '2000.April.1' when in fact it's '2000.04.01'. Adding a note saying that month and day are two-digits with leading 0s, and January is 01 would help." Done.

validator1.simpleStructReturnTest (number) returns struct

This handler takes one parameter, and returns a struct containing three elements, times10, times100 and times1000, the result of multiplying the number by 10, 100 and 1000.

© Copyright 1998-2001 UserLand Software, Inc..
XML-RPC is a trademark of UserLand Software, Inc.
Last update: Friday, June 2, 2000 at 10:07:34 AM Pacific.