org.apache.xmlrpc.applet

Class XmlRpcSupport

class XmlRpcSupport extends HandlerBase

FIXME: Leverage the XmlRpc class.
Nested Class Summary
classXmlRpcSupport.Value
This represents an XML-RPC Value while the request is being parsed.
classXmlRpcSupport.XmlWriter
A quick and dirty XML writer.
Field Summary
static intARRAY
Base64base64
static intBASE64
static intBOOLEAN
StringBuffercdata
XmlRpcSupport.ValuecurrentValue
static booleandebug
static intDATE
static intDOUBLE
booleanfault
static DateFormatformat
static intINTEGER
StringmethodName
booleanreadCdata
Objectresult
static intSTRING
static intSTRUCT
static String[]types
URLurl
Stackvalues
Constructor Summary
XmlRpcSupport(URL url)
Method Summary
voidcharacters(char[] ch, int start, int length)
Method called by SAX driver.
voidendElement(String name)
Method called by SAX driver.
voiderror(SAXParseException e)
Objectexecute(String method, Vector arguments)
Generate an XML-RPC request and send it to the server.
voidfatalError(SAXParseException e)
voidobjectParsed(Object what)
Called when the return value has been parsed.
voidparse(InputStream is)
Parse the input stream.
static voidsetDebug(boolean val)
Switch debugging output on/off.
voidstartElement(String name, AttributeList atts)
Method called by SAX driver.
voidwriteObject(Object what, XmlRpcSupport.XmlWriter writer)
Writes the XML representation of a supported Java object to the XML writer.
voidwriteRequest(XmlRpcSupport.XmlWriter writer, String method, Vector params)
Generate an XML-RPC request from a method name and a parameter vector.

Field Detail

ARRAY

static final int ARRAY

base64

Base64 base64

BASE64

static final int BASE64

BOOLEAN

static final int BOOLEAN

cdata

StringBuffer cdata

currentValue

XmlRpcSupport.Value currentValue

debug

public static boolean debug

DATE

static final int DATE

DOUBLE

static final int DOUBLE

fault

boolean fault

format

static final DateFormat format

INTEGER

static final int INTEGER

methodName

String methodName

readCdata

boolean readCdata

result

Object result

STRING

static final int STRING

STRUCT

static final int STRUCT

types

static final String[] types

url

URL url

values

Stack values

Constructor Detail

XmlRpcSupport

public XmlRpcSupport(URL url)

Parameters: url

Method Detail

characters

public void characters(char[] ch, int start, int length)
Method called by SAX driver.

endElement

public void endElement(String name)
Method called by SAX driver.

error

public void error(SAXParseException e)

Parameters: e

Throws: SAXException

execute

public Object execute(String method, Vector arguments)
Generate an XML-RPC request and send it to the server. Parse the result and return the corresponding Java object.

Throws: XmlRpcException If the remote host returned a fault message. IOException If the call could not be made for lower level problems.

fatalError

public void fatalError(SAXParseException e)

Parameters: e

Throws: SAXException

objectParsed

void objectParsed(Object what)
Called when the return value has been parsed.

parse

void parse(InputStream is)
Parse the input stream. For each root level object, method objectParsed is called.

setDebug

public static void setDebug(boolean val)
Switch debugging output on/off.

startElement

public void startElement(String name, AttributeList atts)
Method called by SAX driver.

writeObject

void writeObject(Object what, XmlRpcSupport.XmlWriter writer)
Writes the XML representation of a supported Java object to the XML writer.

writeRequest

void writeRequest(XmlRpcSupport.XmlWriter writer, String method, Vector params)
Generate an XML-RPC request from a method name and a parameter vector.
Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.