Skip Menu |

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

Report information
The Basics
Id: 39715
Status: resolved
Priority: 0/
Queue: SOAP-WSDL

People
Owner: Nobody in particular
Requestors: martin.kutter [...] fen-net.de
Cc: colin.hotzky.ext [...] siemens.com
AdminCc:

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



CC: colin.hotzky.ext [...] siemens.com
Subject: Error with complexType extension base without child elements
Date: Tue, 30 Sep 2008 21:13:55 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
The following XML schema snippet in a WSDL causes wsdl2perl.pl to abort with the error /home/martin/workspace/SOAP-WSDL/lib/SOAP/WSDL/Generator/Template/XSD \complexType.tt undef error - Can't call method "get_name" without a package or object reference at /home/martin/workspace/SOAP-WSDL/lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm line 158. at /home/martin/workspace/SOAP-WSDL/lib/SOAP/WSDL/Base.pm line 62 <s:complexType name="Parent" abstract="true"> </s:complexType> <s:complexType name="Child"> <s:complexContent> <s:extension base="tns:Parent"> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="GrandChild" abstract="true"> <s:complexContent> <s:extension base="tns:Child"> <s:sequence> <s:element name="Permissions" type="s:string" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> The error does not occur if the intermediate complexType (Child) has sequence elements like this: <s:complexType name="Child"> <s:complexContent> <s:extension base="tns:Parent"> <s:sequence> <s:element name="foo" type="s:string"></s:element> </s:sequence> </s:extension> </s:complexContent> </s:complexType> This means that you currently cannot have intermediate classes in a inheritance hierarchy without any sequence elements.
This is a rather subtle error caused by a bad init value (undef) for the list of complexType sequence elements. Changing the init value to [] (empty list ref) fixes the error. Applied in SVN (rev742).