SOAP-WSDL - as_hash_ref returns undef for element which is a complex type

Posted on Wed Jul 30 17:34:32 2008 by johngrr
as_hash_ref returns undef for element which is a complex type

SOAP::WSDL::XSD::Typelib::ComplexType::as_hash_ref returns undef when called as a method on an Element derived from a ComplexType, because

my $attributes_ref = $ATTRIBUTES_OF{ ref $self );

is undef, since the Element class doesn't have an entry in %ATTRIBUTES_OF, only the base ComplexType subclass does.

I've hacked in some code using Class::ISA to find the first base class which isa ComplexType, and use its attributes.

Is there some better way to get an Element contents as a hashref?

Write a response