org.apache.xmlrpc.applet

Class XmlRpcSupport


(package private) class XmlRpcSupport
extends org.xml.sax.HandlerBase

FIXME: Leverage the XmlRpc class.

Nested Class Summary

(package private) class
XmlRpcSupport.Value
This represents an XML-RPC Value while the request is being parsed.
(package private) class
XmlRpcSupport.XmlWriter
A quick and dirty XML writer.

Field Summary

(package private) static int
ARRAY
(package private) static int
BASE64
(package private) static int
BOOLEAN
(package private) static int
DATE
(package private) static int
DOUBLE
(package private) static int
INTEGER
(package private) static int
STRING
(package private) static int
STRUCT
(package private) Base64
base64
(package private) StringBuffer
cdata
(package private) XmlRpcSupport.Value
currentValue
static boolean
debug
(package private) boolean
fault
(package private) static DateFormat
format
(package private) String
methodName
(package private) boolean
readCdata
(package private) Object
result
(package private) static String[]
types
(package private) URL
url
(package private) Stack
values

Constructor Summary

XmlRpcSupport(URL url)

Method Summary

void
characters(ch[] , int start, int length)
Method called by SAX driver.
void
endElement(String name)
Method called by SAX driver.
void
error(org.xml.sax.SAXParseException e)
Object
execute(String method, Vector arguments)
Generate an XML-RPC request and send it to the server.
void
fatalError(org.xml.sax.SAXParseException e)
(package private) void
objectParsed(Object what)
Called when the return value has been parsed.
(package private) void
parse(InputStream is)
Parse the input stream.
static void
setDebug(boolean val)
Switch debugging output on/off.
void
startElement(String name, org.xml.sax.AttributeList atts)
Method called by SAX driver.
(package private) void
writeObject(Object what, XmlRpcSupport.XmlWriter writer)
Writes the XML representation of a supported Java object to the XML writer.
(package private) void
writeRequest(XmlRpcSupport.XmlWriter writer, String method, Vector params)
Generate an XML-RPC request from a method name and a parameter vector.

Field Details

ARRAY

(package private) static final int ARRAY
Field Value:
7

BASE64

(package private) static final int BASE64
Field Value:
5

BOOLEAN

(package private) static final int BOOLEAN
Field Value:
2

DATE

(package private) static final int DATE
Field Value:
4

DOUBLE

(package private) static final int DOUBLE
Field Value:
3

INTEGER

(package private) static final int INTEGER
Field Value:
1

STRING

(package private) static final int STRING
Field Value:
0

STRUCT

(package private) static final int STRUCT
Field Value:
6

base64

(package private)  Base64 base64

cdata

(package private)  StringBuffer cdata

currentValue

(package private)  XmlRpcSupport.Value currentValue

debug

public static boolean debug

fault

(package private)  boolean fault

format

(package private) static final DateFormat format

methodName

(package private)  String methodName

readCdata

(package private)  boolean readCdata

result

(package private)  Object result

types

(package private) static final String[] types

url

(package private)  URL url

values

(package private)  Stack values

Constructor Details

XmlRpcSupport

public XmlRpcSupport(URL url)
Parameters:
url -

Method Details

characters

public void characters(ch[] ,
                       int start,
                       int length)
            throws org.xml.sax.SAXException
Method called by SAX driver.

endElement

public void endElement(String name)
            throws org.xml.sax.SAXException
Method called by SAX driver.

error

public void error(org.xml.sax.SAXParseException e)
            throws org.xml.sax.SAXException
Parameters:
e -
Throws:
org.xml.sax.SAXException -

execute

public Object execute(String method,
                      Vector arguments)
            throws XmlRpcException,
                   IOException
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.

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
            throws org.xml.sax.SAXException
Parameters:
e -
Throws:
org.xml.sax.SAXException -

objectParsed

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

parse

(package private)  void parse(InputStream is)
            throws Exception
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,
                         org.xml.sax.AttributeList atts)
            throws org.xml.sax.SAXException
Method called by SAX driver.

writeObject

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

writeRequest

(package private)  void writeRequest(XmlRpcSupport.XmlWriter writer,
                                     String method,
                                     Vector params)
            throws IOException
Generate an XML-RPC request from a method name and a parameter vector.

Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.