org.apache.axis2.databinding.utils
Class BeanUtil

java.lang.Object
  extended byorg.apache.axis2.databinding.utils.BeanUtil

public class BeanUtil
extends Object


Constructor Summary
BeanUtil()
           
 
Method Summary
static Object deserialize(Class beanClass, org.apache.axiom.om.OMElement beanElement)
           
static Object deserialize(Class beanClass, org.apache.axiom.om.OMElement beanElement, MultirefHelper helper)
           
static Object[] deserialize(org.apache.axiom.om.OMElement response, Object[] javaTypes)
          To get JavaObjects from XML elemnt , the element most of the time contains only one element in that case that element will be converted to the JavaType specified by the javaTypes array The algo is as follows, get the childerns of the response element , and if it conatian more than one element then check the retuen type of that element and conver that to corresponding JavaType
static org.apache.axiom.om.OMElement getOMElement(QName opName, Object[] args, String partName)
           
static XMLStreamReader getPullParser(Object beanObject)
          to get the pull parser for a given bean object , generate the wrpper elemnet using class name
static XMLStreamReader getPullParser(Object beanObject, QName beanName)
          To Serilize Bean object this method is used, this will create an object array using given bean object
static Object processObject(org.apache.axiom.om.OMElement omElement, Class classType, MultirefHelper helper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanUtil

public BeanUtil()
Method Detail

getPullParser

public static XMLStreamReader getPullParser(Object beanObject,
                                            QName beanName)
To Serilize Bean object this method is used, this will create an object array using given bean object

Parameters:
beanObject -
beanName -

getPullParser

public static XMLStreamReader getPullParser(Object beanObject)
to get the pull parser for a given bean object , generate the wrpper elemnet using class name

Parameters:
beanObject -

deserialize

public static Object deserialize(Class beanClass,
                                 org.apache.axiom.om.OMElement beanElement)
                          throws AxisFault
Throws:
AxisFault

deserialize

public static Object deserialize(Class beanClass,
                                 org.apache.axiom.om.OMElement beanElement,
                                 MultirefHelper helper)
                          throws AxisFault
Throws:
AxisFault

deserialize

public static Object[] deserialize(org.apache.axiom.om.OMElement response,
                                   Object[] javaTypes)
                            throws AxisFault
To get JavaObjects from XML elemnt , the element most of the time contains only one element in that case that element will be converted to the JavaType specified by the javaTypes array The algo is as follows, get the childerns of the response element , and if it conatian more than one element then check the retuen type of that element and conver that to corresponding JavaType

Parameters:
response - OMElement
javaTypes - Array of JavaTypes
Returns:
Array of objects
Throws:
AxisFault

processObject

public static Object processObject(org.apache.axiom.om.OMElement omElement,
                                   Class classType,
                                   MultirefHelper helper)
                            throws AxisFault
Throws:
AxisFault

getOMElement

public static org.apache.axiom.om.OMElement getOMElement(QName opName,
                                                         Object[] args,
                                                         String partName)