class XmlRpcSupport
extends org.xml.sax.HandlerBase
Modifier and Type | Class and Description |
---|---|
(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.
|
Modifier and Type | Field and Description |
---|---|
(package private) static int |
ARRAY |
(package private) Base64 |
base64 |
(package private) static int |
BASE64 |
(package private) static int |
BOOLEAN |
(package private) java.lang.StringBuffer |
cdata |
(package private) XmlRpcSupport.Value |
currentValue |
(package private) static int |
DATE |
static boolean |
debug |
(package private) static int |
DOUBLE |
(package private) boolean |
fault |
(package private) static java.text.DateFormat |
format |
(package private) static int |
INTEGER |
(package private) java.lang.String |
methodName |
(package private) boolean |
readCdata |
(package private) java.lang.Object |
result |
(package private) static int |
STRING |
(package private) static int |
STRUCT |
(package private) static java.lang.String[] |
types |
(package private) java.net.URL |
url |
(package private) java.util.Stack |
values |
Constructor and Description |
---|
XmlRpcSupport(java.net.URL url) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Method called by SAX driver.
|
void |
endElement(java.lang.String name)
Method called by SAX driver.
|
void |
error(org.xml.sax.SAXParseException e)
Receive notification of a recoverable parser error.
|
java.lang.Object |
execute(java.lang.String method,
java.util.Vector arguments)
Generate an XML-RPC request and send it to the server.
|
void |
fatalError(org.xml.sax.SAXParseException e)
Report a fatal XML parsing error.
|
(package private) void |
objectParsed(java.lang.Object what)
Called when the return value has been parsed.
|
(package private) void |
parse(java.io.InputStream is)
Parse the input stream.
|
static void |
setDebug(boolean val)
Switch debugging output on/off.
|
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
Method called by SAX driver.
|
(package private) void |
writeObject(java.lang.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,
java.lang.String method,
java.util.Vector params)
Generate an XML-RPC request from a method name and a parameter vector.
|
java.net.URL url
java.lang.String methodName
boolean fault
java.lang.Object result
Base64 base64
java.util.Stack values
XmlRpcSupport.Value currentValue
boolean readCdata
static final java.text.DateFormat format
java.lang.StringBuffer cdata
static final int STRING
static final int INTEGER
static final int BOOLEAN
static final int DOUBLE
static final int DATE
static final int BASE64
static final int STRUCT
static final int ARRAY
public static boolean debug
static final java.lang.String[] types
public static void setDebug(boolean val)
void parse(java.io.InputStream is) throws java.lang.Exception
objectParsed
is called.java.lang.Exception
void writeObject(java.lang.Object what, XmlRpcSupport.XmlWriter writer) throws java.io.IOException
java.io.IOException
public java.lang.Object execute(java.lang.String method, java.util.Vector arguments) throws XmlRpcException, java.io.IOException
XmlRpcException
- If the remote host returned a fault message.java.io.IOException
- If the call could not be made for lower level
problems.void objectParsed(java.lang.Object what)
void writeRequest(XmlRpcSupport.XmlWriter writer, java.lang.String method, java.util.Vector params) throws java.io.IOException
java.io.IOException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.DocumentHandler
characters
in class org.xml.sax.HandlerBase
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.characters(char[], int, int)
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.DocumentHandler
endElement
in class org.xml.sax.HandlerBase
name
- The element type name.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.endElement(java.lang.String)
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.DocumentHandler
startElement
in class org.xml.sax.HandlerBase
name
- The element type name.atts
- The specified or defaulted attributes.org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.HandlerBase
The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console.
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.HandlerBase
e
- org.xml.sax.SAXException
ErrorHandler.warning(org.xml.sax.SAXParseException)
,
SAXParseException
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.HandlerBase
The default implementation throws a SAXParseException. Application writers may override this method in a subclass if they need to take specific actions for each fatal error (such as collecting all of the errors into a single report): in any case, the application must stop all regular processing when this method is invoked, since the document is no longer reliable, and the parser may no longer report parsing events.
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.HandlerBase
e
- org.xml.sax.SAXException
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
,
SAXParseException
Copyright ? 1999-2002 Apache Software Foundation. All Rights Reserved.