public class XmlRpcResponseParser extends RecursiveTypeParserImpl
XmlRpcServer
's
response.cfg
Constructor and Description |
---|
XmlRpcResponseParser(XmlRpcStreamRequestConfig pConfig,
TypeFactory pTypeFactory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(Object pResult) |
void |
endElement(String pURI,
String pLocalName,
String pQName) |
Throwable |
getErrorCause()
If the response contained a fault, returns the (optional)
exception.
|
int |
getErrorCode()
If the response contained a fault, returns the error code.
|
String |
getErrorMessage()
If the response contained a fault, returns the error message.
|
boolean |
isSuccess()
Returns whether the response returned success.
|
void |
startDocument() |
void |
startElement(String pURI,
String pLocalName,
String pQName,
Attributes pAttrs) |
characters, endPrefixMapping, endValueTag, ignorableWhitespace, processingInstruction, skippedEntity, startPrefixMapping, startValueTag
endDocument, getDocumentLocator, getResult, isEmpty, setDocumentLocator, setResult
public XmlRpcResponseParser(XmlRpcStreamRequestConfig pConfig, TypeFactory pTypeFactory)
pConfig
- The response configuration.pTypeFactory
- The type factory for creating instances of
TypeParser
.protected void addResult(Object pResult) throws SAXException
addResult
in class RecursiveTypeParserImpl
SAXException
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class RecursiveTypeParserImpl
SAXException
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class RecursiveTypeParserImpl
SAXException
public void endElement(String pURI, String pLocalName, String pQName) throws SAXException
endElement
in interface ContentHandler
endElement
in class RecursiveTypeParserImpl
SAXException
public boolean isSuccess()
TypeParserImpl.getResult()
.
Otherwise, you may use the methods
getErrorCode()
and getErrorMessage()
to
check for error reasons.public int getErrorCode()
public String getErrorMessage()
public Throwable getErrorCause()
Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.