Subject: | minor bug found and fixed in WSDL generation |
Date: | Wed, 9 Jan 2008 12:42:01 +0100 |
To: | <bug-SOAP-WSDL [...] rt.cpan.org> |
From: | "Ashley Hindmarsh" <A.Hindmarsh [...] office.caiw.nl> |
I can't release the WSDL (confidentiality), but I'm sure it's a problem
with empty XSD complex types (e.g. <sequence/>), and the get_element()
function returning an unchecked undef.
The error:
Can't use an undefined value as an ARRAY reference at
/usr/local/lib/perl5/site_perl/5.8.8/SOAP/WSDL/Generator/Visitor/Typemap
.pm line 248
In SOAP/WSDL/Generator/Visitor/Typemap.pm
Patch:
--------------------------------
if ( grep { $_ eq $content_model} qw(all sequence choice) )
{
# visit child elements
- for (@{ $type->get_element() }) {
- $_->_accept( $self );
- }
+ if (my $elements = $type->get_element()) {
+ for (@$elements) {
+ $_->_accept( $self );
+ }
+ }
return;
}
---------------------------------
Distro http://search.cpan.org/~mkutter/SOAP-WSDL-2.00_28/
Perl 5.8.8
FreeBSD tagans.caiw.net 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed May 16
11:44:28 CEST 2007 strommel@tagans.caiw.net:/usr/obj/usr/src/sys/CN
i386
Regards,
Ashley Hindmarsh / on behalf of CAIW Netwerken (I am not an employee,
but a contractor)