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.