java.lang.Object
org.apache.axis.encoding.ser.BeanSerializer
- All Implemented Interfaces:
- java.io.Serializable, javax.xml.rpc.encoding.Serializer, org.apache.axis.encoding.Serializer
- public class BeanSerializer
- extends java.lang.Object
- implements org.apache.axis.encoding.Serializer, java.io.Serializable
General purpose serializer/deserializerFactory for an arbitrary java bean.
|
Method Summary |
java.lang.String |
getMechanismType()
Gets the type of the XML processing mechanism and representation used by this Serializer. |
protected org.xml.sax.Attributes |
getObjectAttributes(java.lang.Object value,
org.xml.sax.Attributes attributes,
org.apache.axis.encoding.SerializationContext context)
Check for meta-data in the bean that will tell us if any of the
properties are actually attributes, add those to the element
attribute list |
void |
serialize(javax.xml.namespace.QName name,
org.xml.sax.Attributes attributes,
java.lang.Object value,
org.apache.axis.encoding.SerializationContext context)
Serialize a bean. |
private void |
setAttributeProperty(java.lang.Object propValue,
javax.xml.namespace.QName qname,
javax.xml.namespace.QName xmlType,
org.xml.sax.helpers.AttributesImpl attrs,
org.apache.axis.encoding.SerializationContext context)
|
protected void |
writeAttribute(org.apache.axis.wsdl.fromJava.Types types,
java.lang.String fieldName,
java.lang.Class fieldType,
javax.xml.namespace.QName fieldXmlType,
org.w3c.dom.Element where)
write aa attribute element and append it to the 'where' Node |
protected void |
writeField(org.apache.axis.wsdl.fromJava.Types types,
java.lang.String fieldName,
javax.xml.namespace.QName xmlType,
java.lang.Class fieldType,
boolean isUnbounded,
boolean isOmittable,
org.w3c.dom.Element where,
boolean isAnonymous,
javax.xml.namespace.QName itemQName)
write a schema representation of the given Class field and append it to
the where Node, recurse on complex types |
org.w3c.dom.Element |
writeSchema(java.lang.Class javaType,
org.apache.axis.wsdl.fromJava.Types types)
Return XML schema for the specified type, suitable for insertion into
the <types> element of a WSDL document, or underneath an
<element> or <attribute> declaration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
MUST_UNDERSTAND_QNAME
private static final javax.xml.namespace.QName MUST_UNDERSTAND_QNAME
ZERO_ARGS
private static final java.lang.Object[] ZERO_ARGS
xmlType
javax.xml.namespace.QName xmlType
javaType
java.lang.Class javaType
propertyDescriptor
protected org.apache.axis.utils.BeanPropertyDescriptor[] propertyDescriptor
typeDesc
protected org.apache.axis.description.TypeDesc typeDesc
BeanSerializer
public BeanSerializer(java.lang.Class javaType,
javax.xml.namespace.QName xmlType)
BeanSerializer
public BeanSerializer(java.lang.Class javaType,
javax.xml.namespace.QName xmlType,
org.apache.axis.description.TypeDesc typeDesc)
BeanSerializer
public BeanSerializer(java.lang.Class javaType,
javax.xml.namespace.QName xmlType,
org.apache.axis.description.TypeDesc typeDesc,
org.apache.axis.utils.BeanPropertyDescriptor[] propertyDescriptor)
serialize
public void serialize(javax.xml.namespace.QName name,
org.xml.sax.Attributes attributes,
java.lang.Object value,
org.apache.axis.encoding.SerializationContext context)
throws java.io.IOException
- Serialize a bean. Done simply by serializing each bean property.
- Specified by:
serialize in interface org.apache.axis.encoding.Serializer
getMechanismType
public java.lang.String getMechanismType()
- Description copied from interface:
javax.xml.rpc.encoding.Serializer
- Gets the type of the XML processing mechanism and representation used by this Serializer.
- Specified by:
getMechanismType in interface javax.xml.rpc.encoding.Serializer
writeSchema
public org.w3c.dom.Element writeSchema(java.lang.Class javaType,
org.apache.axis.wsdl.fromJava.Types types)
throws java.lang.Exception
- Return XML schema for the specified type, suitable for insertion into
the <types> element of a WSDL document, or underneath an
<element> or <attribute> declaration.
- Specified by:
writeSchema in interface org.apache.axis.encoding.Serializer
writeField
protected void writeField(org.apache.axis.wsdl.fromJava.Types types,
java.lang.String fieldName,
javax.xml.namespace.QName xmlType,
java.lang.Class fieldType,
boolean isUnbounded,
boolean isOmittable,
org.w3c.dom.Element where,
boolean isAnonymous,
javax.xml.namespace.QName itemQName)
throws java.lang.Exception
- write a schema representation of the given Class field and append it to
the where Node, recurse on complex types
writeAttribute
protected void writeAttribute(org.apache.axis.wsdl.fromJava.Types types,
java.lang.String fieldName,
java.lang.Class fieldType,
javax.xml.namespace.QName fieldXmlType,
org.w3c.dom.Element where)
throws java.lang.Exception
- write aa attribute element and append it to the 'where' Node
getObjectAttributes
protected org.xml.sax.Attributes getObjectAttributes(java.lang.Object value,
org.xml.sax.Attributes attributes,
org.apache.axis.encoding.SerializationContext context)
- Check for meta-data in the bean that will tell us if any of the
properties are actually attributes, add those to the element
attribute list
setAttributeProperty
private void setAttributeProperty(java.lang.Object propValue,
javax.xml.namespace.QName qname,
javax.xml.namespace.QName xmlType,
org.xml.sax.helpers.AttributesImpl attrs,
org.apache.axis.encoding.SerializationContext context)
throws java.lang.Exception