In this code snippet from org.apache.axis.message.RPCHandler, around line
260 in the axis-1.2 beta sources,

              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.getDeserializerForType(Constants.SOAP_ELEMENT);

              }
the test using isAssignableFrom looks backwards, if I am reading the javadoc
for Class.isAssignableFrom correctly.  I think this is saying that if
destClass is Element or a superinterface of Element use the SoapElement
deserializer, but what was intended was to use the SoapElement deserializer
if destClass implements or is a subinterface of Element.  Fortunately, since
Element is an interface, Object does not fit the conditions of this test, so
the deserializer won't be chosen incorrectly at least.  Presumably destClass
is always a class, so can never be a superinterface of Element and the test
will always fail.

I think what was intended was
   Element.class.isAssignableFrom(destClass)

Please pardon me if I have misunderstood the intent of this code.

Jeff

Reply via email to