org.sadun.util
Class AxisObjectSerializer

java.lang.Object
  extended byorg.sadun.util.AxisObjectSerializer

public class AxisObjectSerializer
extends java.lang.Object

This class serializes an AXIS object into an XML byte array.

The java objexts must have been generated with wsdl2java. 1.2RC3.

This class uses reflection and does not refer directly to any AXIS class, so it does not require Axis libraries in classpath to compile.

This class is a singleton.

Author:
Cristiano Sadun

Method Summary
static AxisObjectSerializer getInstance()
          Retrieve the unique instance of the serializer.
 byte[] serializeAxisObjectToXML(java.lang.Object obj)
          Serialize an Axis java object to XML.
 java.lang.String serializeAxisObjectToXMLString(java.lang.Object obj)
          Serialize an Axis java object to XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AxisObjectSerializer getInstance()
Retrieve the unique instance of the serializer.

Returns:
the unique instance of the serializer.

serializeAxisObjectToXML

public byte[] serializeAxisObjectToXML(java.lang.Object obj)
Serialize an Axis java object to XML.

Parameters:
obj - the object to serialize
Returns:
a byte array containing the XML.

serializeAxisObjectToXMLString

public java.lang.String serializeAxisObjectToXMLString(java.lang.Object obj)
Serialize an Axis java object to XML.

Parameters:
obj - the object to serialize
Returns:
a String containing the XML.