FileDocCategorySizeDatePackage
CastorDeserializer.javaAPI DocApache Axis 1.42766Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding.ser.castor

CastorDeserializer

public class CastorDeserializer extends org.apache.axis.encoding.DeserializerImpl implements org.apache.axis.encoding.Deserializer
Castor deserializer
author
Olivier Brand (olivier.brand@vodafone.com)
author
Steve Loughran
version
1.0

Fields Summary
public QName
xmlType
public Class
javaType
Constructors Summary
public CastorDeserializer(Class javaType, QName xmlType)

        this.xmlType = xmlType;
        this.javaType = javaType;
    
Methods Summary
public voidonEndElement(java.lang.String namespace, java.lang.String localName, org.apache.axis.encoding.DeserializationContext context)
Return something even if no characters were found.

        try {
            MessageElement msgElem = context.getCurElement();
            if (msgElem != null) {
                // Unmarshall the nested XML element into a castor object of type 'javaType'
                value = Unmarshaller.unmarshal(javaType, msgElem.getAsDOM());
            }
        } catch (MarshalException me) {
            log.error(Messages.getMessage("castorMarshalException00"), me);
            throw new SAXException(Messages.getMessage("castorMarshalException00")
                    + me.getLocalizedMessage());
        } catch (ValidationException ve) {
            log.error(Messages.getMessage("castorValidationException00"), ve);
            throw new SAXException(Messages.getMessage("castorValidationException00")
                    + ve.getLocation() + ": " + ve.getLocalizedMessage());
        } catch (Exception exp) {
            log.error(Messages.getMessage("exception00"), exp);
            throw new SAXException(exp);
        }