FileDocCategorySizeDatePackage
DataDeser.javaAPI DocApache Axis 1.42275Sat Apr 22 18:57:28 BST 2006test.encoding

DataDeser

public class DataDeser extends org.apache.axis.encoding.DeserializerImpl

Fields Summary
public static final String
STRINGMEMBER
public static final String
FLOATMEMBER
private Hashtable
typesByMemberName
Constructors Summary
public DataDeser()

  
    
     
    
        typesByMemberName.put(STRINGMEMBER, Constants.XSD_STRING);
        typesByMemberName.put(FLOATMEMBER, Constants.XSD_FLOAT);
        value = new Data();
    
Methods Summary
public org.apache.axis.message.SOAPHandleronStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
This method is invoked when an element start tag is encountered.

param
namespace is the namespace of the element
param
localName is the name of the element
param
prefix is the prefix of the element
param
attributes are the attributes on the element...used to get the type
param
context is the DeserializationContext

        QName typeQName = (QName)typesByMemberName.get(localName);
        if (typeQName == null)
            throw new SAXException("Invalid element in Data struct - " + localName);
        
        // These can come in either order.
        Deserializer dSer = context.getDeserializerForType(typeQName);
        try {
            dSer.registerValueTarget(new FieldTarget(value, localName));
        } catch (NoSuchFieldException e) {
            throw new SAXException(e);
        }
        
        if (dSer == null)
            throw new SAXException("No deserializer for a " + typeQName + "???");
        
        return (SOAPHandler)dSer;