Skip Menu |

This queue is for tickets about the SOAP-WSDL CPAN distribution.

Report information
The Basics
Id: 61234
Status: new
Priority: 0/

Owner: Nobody in particular
Requestors: tboesch [...]

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)

Subject: cannot use Complex::Subtype reference as value for Complex::Supertype - Complex::Supertype required
Download (untitled) / with headers
text/plain 1.8k
Hi I have a hierarchy of types inheriting from SOAP::WSDL::XSD::Typelib::ComplexType, ie: SOAP::WSDL::XSD::Typelib::ComplexType IProperty IAttribute IAttributeDateTime IAttributeDouble IAttributeString If I use one of the subtypes (eg. IAttributeString) in a constructor that expects one of the supertypes (eg. IAttribute) the constructor fails with something similar to 'cannot use IAttributeString reference as value for IAttribute - IAttribute required'. Discovering the hierarchy from the WSDL worked without flaw. I think that this fixes it for me ( borrowing from your own code a few lines below :-) ): [SOAP-WSDL]$ svn info Path: . URL: Repository Root: Repository UUID: 662ab66d-5931-0410-9760-8af722b24055 Revision: 864 Node Kind: directory Schedule: normal Last Changed Author: kutterma Last Changed Rev: 864 Last Changed Date: 2010-06-27 11:08:18 +0200 (Sun, 27 Jun 2010) [SOAP-WSDL]$ svn diff Index: lib/SOAP/WSDL/XSD/Typelib/ =================================================================== --- lib/SOAP/WSDL/XSD/Typelib/ (revision 864) +++ lib/SOAP/WSDL/XSD/Typelib/ (working copy) @@ -221,7 +221,7 @@ ref $_ ? ref $_ eq 'HASH' ? $type->new($_) - : ref $_ eq $type + : blessed $_ && $_->isa($type) ? $_ : croak "cannot use " . ref($_) . " reference as value for $name - $type required" : $type->new({ value => $_ }) Thank you for making great (and so much) software. Tobias

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to