@Override public SOAPHandler onStartChild(String namespace,String localName,String prefix,Attributes attributes,DeserializationContext context) throws SAXException {
  handleMixedContent();
  BeanPropertyDescriptor propDesc=null;
  FieldDesc fieldDesc=null;
  SOAPConstants soapConstants=context.getSOAPConstants();
  String encodingStyle=context.getEncodingStyle();
  boolean isEncoded=Constants.isSOAP_ENC(encodingStyle);
  QName elemQName=new QName(namespace,localName);
  if ((prevQName == null) || (!prevQName.equals(elemQName))) {
    collectionIndex=-1;
  }
  boolean isArray=false;
  QName itemQName=null;
  if (typeDesc != null) {
    String fieldName=typeDesc.getFieldNameForElement(elemQName,isEncoded);
    propDesc=(BeanPropertyDescriptor)propertyMap.get(fieldName);
    fieldDesc=typeDesc.getFieldByName(fieldName);
    if (fieldDesc != null) {
      ElementDesc element=(ElementDesc)fieldDesc;
      isArray=element.isMaxOccursUnbounded();
      itemQName=element.getItemQName();
    }
  }
  if (propDesc == null) {
    propDesc=(BeanPropertyDescriptor)propertyMap.get(localName);
  }
  if (propDesc == null) {
    StringBuilder sb=new StringBuilder();
    sb.append(Character.toLowerCase(localName.charAt(0)));
    if (localName.length() > 1)     sb.append(localName.substring(1));
    propDesc=(BeanPropertyDescriptor)propertyMap.get(sb.toString());
  }
  if (propDesc == null || (((prevQName != null) && prevQName.equals(elemQName) && !(propDesc.isIndexed() || isArray)&& getAnyPropertyDesc() != null))) {
    prevQName=elemQName;
    propDesc=getAnyPropertyDesc();
    if (propDesc != null) {
      try {
        MessageElement[] curElements=(MessageElement[])propDesc.get(value);
        int length=0;
        if (curElements != null) {
          length=curElements.length;
        }
        MessageElement[] newElements=new MessageElement[length + 1];
        if (curElements != null) {
          System.arraycopy(curElements,0,newElements,0,length);
        }
        MessageElement thisEl=context.getCurElement();
        newElements[length]=thisEl;
        propDesc.set(value,newElements);
        if (!localName.equals(thisEl.getName())) {
          return new SOAPHandler(newElements,length);
        }
        return new SOAPHandler();
      }
 catch (      Exception e) {
        throw new SAXException(e);
      }
    }
  }
  if (propDesc == null) {
    throw new SAXException(Messages.getMessage("badElem00",javaType.getName(),localName));
  }
  prevQName=elemQName;
  QName childXMLType=context.getTypeFromAttributes(namespace,localName,attributes);
  String href=attributes.getValue(soapConstants.getAttrHref());
  Class fieldType=propDesc.getType();
  if (childXMLType == null && fieldDesc != null && href == null) {
    childXMLType=fieldDesc.getXmlType();
    if (itemQName != null) {
      childXMLType=Constants.SOAP_ARRAY;
      fieldType=propDesc.getActualType();
    }
 else {
      childXMLType=fieldDesc.getXmlType();
    }
  }
  Deserializer dSer=getDeserializer(childXMLType,fieldType,href,context);
  if (dSer == null) {
    dSer=context.getDeserializerForClass(propDesc.getType());
  }
  if (context.isNil(attributes)) {
    if ((propDesc.isIndexed() || isArray)) {
      if (!((dSer != null) && (dSer instanceof ArrayDeserializer))) {
        collectionIndex++;
        dSer.registerValueTarget(new BeanPropertyTarget(value,propDesc,collectionIndex));
        addChildDeserializer(dSer);
        return (SOAPHandler)dSer;
      }
    }
    return null;
  }
  if (dSer == null) {
    throw new SAXException(Messages.getMessage("noDeser00",childXMLType.toString()));
  }
  if (constructorToUse != null) {
    if (constructorTarget == null) {
      constructorTarget=new ConstructorTarget(constructorToUse,this);
    }
    dSer.registerValueTarget(constructorTarget);
  }
 else   if (propDesc.isWriteable()) {
    if ((itemQName != null || propDesc.isIndexed() || isArray) && !(dSer instanceof ArrayDeserializer)) {
      collectionIndex++;
      dSer.registerValueTarget(new BeanPropertyTarget(value,propDesc,collectionIndex));
    }
 else {
      collectionIndex=-1;
      dSer.registerValueTarget(new BeanPropertyTarget(value,propDesc));
    }
  }
  addChildDeserializer(dSer);
  return (SOAPHandler)dSer;
}

@ Override public SOAPHandler onStartChild ( String namespace , String localName , String prefix , Attributes attributes , DeserializationContext context ) throws SAXException { handleMixedContent ( ) ; BeanPropertyDescriptor propDesc = null ; FieldDesc fieldDesc = null ; SOAPConstants soapConstants = context . getSOAPConstants ( ) ; String encodingStyle = context . getEncodingStyle ( ) ; boolean isEncoded = Constants . isSOAP_ENC ( encodingStyle ) ; QName elemQName = new QName ( namespace , localName ) ; if ( ( prevQName == null ) || ( ! prevQName . equals ( elemQName ) ) ) { collectionIndex = - 1 ; } boolean isArray = false ; QName itemQName = null ; if ( typeDesc != null ) { String fieldName = typeDesc . getFieldNameForElement ( elemQName , isEncoded ) ; propDesc = ( BeanPropertyDescriptor ) propertyMap . get ( fieldName ) ; fieldDesc = typeDesc . getFieldByName ( fieldName ) ; if ( fieldDesc != null ) { ElementDesc element = ( ElementDesc ) fieldDesc ; isArray = element . isMaxOccursUnbounded ( ) ; itemQName = element . getItemQName ( ) ; } } if ( propDesc == null ) { propDesc = ( BeanPropertyDescriptor ) propertyMap . get ( localName ) ; } if ( propDesc == null ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( Character . toLowerCase ( localName . charAt ( 0 ) ) ) ; if ( localName . length ( ) > 1 ) sb . append ( localName . substring ( 1 ) ) ; propDesc = ( BeanPropertyDescriptor ) propertyMap . get ( sb . toString ( ) ) ; } if ( propDesc == null || ( ( ( prevQName != null ) && prevQName . equals ( elemQName ) && ! ( propDesc . isIndexed ( ) || isArray ) && getAnyPropertyDesc ( ) != null ) ) ) { prevQName = elemQName ; propDesc = getAnyPropertyDesc ( ) ; if ( propDesc != null ) { try { MessageElement [ ] curElements = ( MessageElement [ ] ) propDesc . get ( value ) ; int length = 0 ; if ( curElements != null ) { length = curElements . length ; } MessageElement [ ] newElements = new MessageElement [ length + 1 ] ; if ( curElements != null ) { System . arraycopy ( curElements , 0 , newElements , 0 , length ) ; } MessageElement thisEl = context . getCurElement ( ) ; newElements [ length ] = thisEl ; propDesc . set ( value , newElements ) ; if ( ! localName . equals ( thisEl . getName ( ) ) ) { return new SOAPHandler ( newElements , length ) ; } return new SOAPHandler ( ) ; } catch ( Exception e ) { throw new SAXException ( e ) ; } } } if ( propDesc == null ) { throw new SAXException ( Messages . getMessage ( "badElem00" , javaType . getName ( ) , localName ) ) ; } prevQName = elemQName ; QName childXMLType = context . getTypeFromAttributes ( namespace , localName , attributes ) ; String href = attributes . getValue ( soapConstants . getAttrHref ( ) ) ; Class fieldType = propDesc . getType ( ) ; if ( childXMLType == null && fieldDesc != null && href == null ) { childXMLType = fieldDesc . getXmlType ( ) ; if ( itemQName != null ) { childXMLType = Constants . SOAP_ARRAY ; fieldType = propDesc . getActualType ( ) ; } else { childXMLType = fieldDesc . getXmlType ( ) ; } } Deserializer dSer = getDeserializer ( childXMLType , fieldType , href , context ) ; if ( dSer == null ) { dSer = context . getDeserializerForClass ( propDesc . getType ( ) ) ; } if ( context . isNil ( attributes ) ) { if ( ( propDesc . isIndexed ( ) || isArray ) ) { if ( ! ( ( dSer != null ) && ( dSer instanceof ArrayDeserializer ) ) ) { collectionIndex ++ ; dSer . registerValueTarget ( new BeanPropertyTarget ( value , propDesc , collectionIndex ) ) ; addChildDeserializer ( dSer ) ; return ( SOAPHandler ) dSer ; } } return null ; } if ( dSer == null ) { throw new SAXException ( Messages . getMessage ( "noDeser00" , childXMLType . toString ( ) ) ) ; } if ( constructorToUse != null ) { if ( constructorTarget == null ) { constructorTarget = new ConstructorTarget ( constructorToUse , this ) ; } dSer . registerValueTarget ( constructorTarget ) ; } else if ( propDesc . isWriteable ( ) ) { if ( ( itemQName != null || propDesc . isIndexed ( ) || isArray ) && ! ( dSer instanceof ArrayDeserializer ) ) { collectionIndex ++ ; dSer . registerValueTarget ( new BeanPropertyTarget ( value , propDesc , collectionIndex ) ) ; } else { collectionIndex = - 1 ; dSer . registerValueTarget ( new BeanPropertyTarget ( value , propDesc ) ) ; } } addChildDeserializer ( dSer ) ; return ( SOAPHandler ) dSer ; }
deserializer interface called on each child element encountered in the xml stream .
