org.apache.xmlrpc.serializer

Class XmlRpcWriter

public class XmlRpcWriter extends Object

This class is responsible for writing an XmlRpc request or an XmlRpc response to an output stream.
Field Summary
static StringEXTENSIONS_URI
The namespace URI for proprietary XML-RPC extensions.
Constructor Summary
XmlRpcWriter(XmlRpcStreamConfig pConfig, ContentHandler pHandler, TypeFactory pTypeFactory)
Creates a new instance.
Method Summary
voidwrite(XmlRpcRequest pRequest)
Writes a clients request to the output stream.
voidwrite(XmlRpcRequestConfig pConfig, Object pResult)
Writes a servers response to the output stream.
voidwrite(XmlRpcRequestConfig pConfig, int pCode, String pMessage)
Writes a servers error message to the output stream.
protected voidwriteValue(Object pObject)
Writes the XML representation of a Java object.

Field Detail

EXTENSIONS_URI

public static final String EXTENSIONS_URI
The namespace URI for proprietary XML-RPC extensions.

Constructor Detail

XmlRpcWriter

public XmlRpcWriter(XmlRpcStreamConfig pConfig, ContentHandler pHandler, TypeFactory pTypeFactory)
Creates a new instance.

Parameters: pConfig The clients configuration. pHandler The target SAX handler. pTypeFactory The type factory being used to create serializers.

Method Detail

write

public void write(XmlRpcRequest pRequest)
Writes a clients request to the output stream.

Parameters: pRequest The request being written.

Throws: SAXException Writing the request failed.

write

public void write(XmlRpcRequestConfig pConfig, Object pResult)
Writes a servers response to the output stream.

Parameters: pConfig The request configuration. pResult The result object.

Throws: SAXException Writing the response failed.

write

public void write(XmlRpcRequestConfig pConfig, int pCode, String pMessage)
Writes a servers error message to the output stream.

Parameters: pConfig The request configuration. pCode The error code pMessage The error message

Throws: SAXException Writing the error message failed.

writeValue

protected void writeValue(Object pObject)
Writes the XML representation of a Java object.

Parameters: pObject The object being written.

Throws: SAXException Writing the object failed.

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.