org.apache.axis.encoding.ser
Class BeanDeserializer
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.axis.message.SOAPHandler
org.apache.axis.encoding.DeserializerImpl
org.apache.axis.encoding.ser.BeanDeserializer
- All Implemented Interfaces:
- Serializable, javax.xml.rpc.encoding.Deserializer, org.apache.axis.encoding.Callback, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class BeanDeserializer
- extends org.apache.axis.encoding.DeserializerImpl
- implements Serializable
General purpose deserializer for an arbitrary java bean.
- Author:
- Sam Ruby , Rich Scheuerle , Tom Jordahl
- See Also:
- Serialized Form
Fields inherited from class org.apache.axis.message.SOAPHandler |
myElement |
Method Summary |
void |
characters(char[] chars,
int start,
int end)
|
org.apache.axis.utils.BeanPropertyDescriptor |
getAnyPropertyDesc()
Get a BeanPropertyDescriptor which indicates where we should
put extensibility elements (i.e. |
void |
onEndElement(String namespace,
String localName,
org.apache.axis.encoding.DeserializationContext context)
|
org.apache.axis.message.SOAPHandler |
onStartChild(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
Deserializer interface called on each child element encountered in
the XML stream. |
void |
onStartElement(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
Set the bean properties that correspond to element attributes. |
void |
startElement(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
startElement
The ONLY reason that this method is overridden is so that
the object value can be set or a reasonable exception is thrown
indicating that the object cannot be created. |
Methods inherited from class org.apache.axis.encoding.DeserializerImpl |
addChildDeserializer, componentsReady, endElement, getDefaultType, getMechanismType, getValue, getValue, getValueTargets, moveValueTargets, registerValueTarget, removeValueTargets, setChildValue, setDefaultType, setValue, setValue, valueComplete |
Methods inherited from class org.apache.axis.message.SOAPHandler |
makeNewElement, onEndChild |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
BeanDeserializer
public BeanDeserializer(Class javaType,
QName xmlType)
BeanDeserializer
public BeanDeserializer(Class javaType,
QName xmlType,
org.apache.axis.description.TypeDesc typeDesc)
BeanDeserializer
public BeanDeserializer(Class javaType,
QName xmlType,
org.apache.axis.description.TypeDesc typeDesc,
Map propertyMap)
startElement
public void startElement(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
throws SAXException
- startElement
The ONLY reason that this method is overridden is so that
the object value can be set or a reasonable exception is thrown
indicating that the object cannot be created. This is done
at this point so that it occurs BEFORE href/id processing.
- Overrides:
startElement
in class org.apache.axis.encoding.DeserializerImpl
- Parameters:
namespace
- is the namespace of the elementlocalName
- is the name of the elementprefix
- is the prefix of the elementattributes
- are the attributes on the element...used to get the
typecontext
- is the DeserializationContext
- Throws:
SAXException
onStartChild
public org.apache.axis.message.SOAPHandler onStartChild(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
throws SAXException
- Deserializer interface called on each child element encountered in
the XML stream.
- Overrides:
onStartChild
in class org.apache.axis.encoding.DeserializerImpl
- Parameters:
namespace
- is the namespace of the child elementlocalName
- is the local name of the child elementprefix
- is the prefix used on the name of the child elementattributes
- are the attributes of the child elementcontext
- is the deserialization context.
- Returns:
- is a Deserializer to use to deserialize a child (must be
a derived class of SOAPHandler) or null if no deserialization should
be performed.
- Throws:
SAXException
getAnyPropertyDesc
public org.apache.axis.utils.BeanPropertyDescriptor getAnyPropertyDesc()
- Get a BeanPropertyDescriptor which indicates where we should
put extensibility elements (i.e. XML which falls under the
auspices of an <xsd:any> declaration in the schema)
- Returns:
- an appropriate BeanPropertyDescriptor, or null
onStartElement
public void onStartElement(String namespace,
String localName,
String prefix,
Attributes attributes,
org.apache.axis.encoding.DeserializationContext context)
throws SAXException
- Set the bean properties that correspond to element attributes.
This method is invoked after startElement when the element requires
deserialization (i.e. the element is not an href and the value is not
nil.)
- Overrides:
onStartElement
in class org.apache.axis.encoding.DeserializerImpl
- Parameters:
namespace
- is the namespace of the elementlocalName
- is the name of the elementprefix
- is the prefix of the elementattributes
- are the attributes on the element...used to get the
typecontext
- is the DeserializationContext
- Throws:
SAXException
characters
public void characters(char[] chars,
int start,
int end)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.apache.axis.message.SOAPHandler
- Throws:
SAXException
onEndElement
public void onEndElement(String namespace,
String localName,
org.apache.axis.encoding.DeserializationContext context)
throws SAXException
- Overrides:
onEndElement
in class org.apache.axis.encoding.DeserializerImpl
- Throws:
SAXException
Copyright © 2012 Railo