// </method>
// so that a list of 3 items is created.
// Failure to register the target would result in the last
// item not being added to the list
if (context.isNil(attributes)) {
Deserializer nilDSer = new DeserializerImpl();
nilDSer.registerValueTarget(
new MethodTarget(currentParam,
RPCParam.getValueSetMethod()));
return (SOAPHandler) nilDSer;
}
Deserializer dser = null;
if ((type == null) && (namespace != null) && (!namespace.equals(""))) {
dser = context.getDeserializerForType(qname);
} else {
dser = context.getDeserializer(destClass, type);
}
if (dser == null) {
if (type != null) {
dser = context.getDeserializerForType(type);
if(null != destClass && dser == null && destClass.isAssignableFrom( org.w3c.dom.Element.class )){
//If a DOM element is expected, as last resort always allow direct mapping
// of parameter's SOAP xml to a DOM element. Support of literal parms by default.
dser = context.getDeserializer(destClass, Constants.SOAP_ELEMENT);
}
if (dser == null) {
throw new SAXException(Messages.getMessage(
"noDeser01", localName,"" + type));
}
if (paramDesc != null && paramDesc.getJavaType() != null) {
// If we have an xsi:type, make sure it makes sense
// with the current paramDesc type
Class xsiClass =
context.getTypeMapping().getClassForQName(type);
if (null != xsiClass && !JavaUtils.isConvertable(xsiClass, destClass)) {
throw new SAXException("Bad types (" +
xsiClass + " -> " + destClass + ")"); // FIXME!
}
}
} else {
dser = new DeserializerImpl();
if (dser == null) {
throw new SAXException(Messages.getMessage(
"noDeser01", localName,"" + type));
}
}
}
dser.setDefaultType(type);
dser.registerValueTarget(
new MethodTarget(currentParam,
RPCParam.getValueSetMethod()));
if (log.isDebugEnabled()) {
log.debug("Exit: RPCHandler.onStartChild()");