Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: colin.hotzky.ext [...] siemens.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.00_05
Fixed in: (no value)



Subject: Deserialization on inherited types
When having a type inherited from another type that is inhertied from ComplexType then the parent (XML-)Elements are not serialized e.g. see files in attachement plus following call: my $CalendarCreateData = CP_SharePoint::ChangeManagement::CalendarCreateData->new(); $CalendarCreateData->set_GroupID( 1000); A die of $CalendarCreateData returns nothing but output of e.g. $CalendarCreateData->get_GroupID shows that the value is set (1000). For finding out which method are valid its shown Can't locate object method "set_GsroupID" via package "CP_SharePoint::ChangeManagement::CalendarCreateData". Valid methods are: at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/XSD/Typelib/ComplexType.pm line 61 Thats why we think that parent attributes are all ignored, for method output and for XML-Serialization. The inheritance was generated automatically by wsdl2perl --- Perl v5.8.8 built for x86_64-linux-thread-multi Linux 2.6.18-92.1.1.el5 #1 SMP Thu May 22 09:01:47 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Subject: ItemCreateData.pm
package CP_SharePoint::ChangeManagement::ItemCreateData; use strict; use warnings; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use base qw(CP_SharePoint::ChangeManagement::ItemData); use Class::Std::Fast::Storable constructor => 'none'; use base qw(SOAP::WSDL::XSD::Typelib::ComplexType); Class::Std::initialize(); { # BLOCK to scope variables my %Folder_of :ATTR(:get<Folder>); my %Author_of :ATTR(:get<Author>); my %GroupID_of :ATTR(:get<GroupID>); __PACKAGE__->_factory( [ qw( Folder Author GroupID ) ], { 'Folder' => \%Folder_of, 'Author' => \%Author_of, 'GroupID' => \%GroupID_of, }, { 'Folder' => 'CP_SharePoint::ChangeManagement::Folders', 'Author' => 'CP_SharePoint::ChangeManagement::NUser', 'GroupID' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', }, { 'Folder' => 'Folder', 'Author' => 'Author', 'GroupID' => 'GroupID', } ); } # end BLOCK 1; =pod =head1 NAME CP_SharePoint::ChangeManagement::ItemCreateData =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType ItemCreateData from the namespace http://tempuri2.org/. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * Folder =item * Author =item * GroupID =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): { # CP_SharePoint::ChangeManagement::ItemCreateData Folder => { # CP_SharePoint::ChangeManagement::Folders SubFolder => $some_value, # string }, Author => { value => $some_value }, GroupID => $some_value, # int }, =head1 AUTHOR Generated by SOAP::WSDL =cut
Subject: ItemData.pm
package CP_SharePoint::ChangeManagement::ItemData; use strict; use warnings; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } # There's no variety - empty complexType use Class::Std::Fast::Storable constructor => 'none'; use base qw(SOAP::WSDL::XSD::Typelib::ComplexType); __PACKAGE__->_factory(); 1; =pod =head1 NAME CP_SharePoint::ChangeManagement::ItemData =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType ItemData from the namespace http://tempuri2.org/. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): , =head1 AUTHOR Generated by SOAP::WSDL =cut
Subject: CalendarCreateData.pm
package CP_SharePoint::ChangeManagement::CalendarCreateData; use strict; use warnings; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use base qw(CP_SharePoint::ChangeManagement::ItemCreateData); # There's no variety - empty complexType use Class::Std::Fast::Storable constructor => 'none'; use base qw(SOAP::WSDL::XSD::Typelib::ComplexType); __PACKAGE__->_factory(); 1; =pod =head1 NAME CP_SharePoint::ChangeManagement::CalendarCreateData =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType CalendarCreateData from the namespace http://tempuri2.org/. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): # No documentation generated for complexContent / extension yet , =head1 AUTHOR Generated by SOAP::WSDL =cut
Subject: Re: [rt.cpan.org #40650] Deserialization on inherited types
Date: Tue, 04 Nov 2008 14:30:43 +0100
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Hi Colin, SOAP::WSDL's XSD generator should flatten out inheritance - i.e. inherited members should be repeated in the derived classes. This apparently is not the case in the examples you provided - which probably means something's wrong in the generator code. Which version are you using? Could you provide the WSDL? Thanks, Martin Am Dienstag, den 04.11.2008, 05:41 -0500 schrieb colin.hotzky.ext@siemens.com via RT: Show quoted text
> Tue Nov 04 05:41:21 2008: Request 40650 was acted upon. > Transaction: Ticket created by colin.hotzky.ext@siemens.com > Queue: SOAP-WSDL > Subject: Deserialization on inherited types > Broken in: 2.00_05 > Severity: Important > Owner: Nobody > Requestors: colin.hotzky.ext@siemens.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40650 > > > > When having a type inherited from another type that is inhertied from > ComplexType then the parent (XML-)Elements are not serialized > e.g. see files in attachement plus following call: > > my $CalendarCreateData = > CP_SharePoint::ChangeManagement::CalendarCreateData->new(); > > $CalendarCreateData->set_GroupID( 1000); > > A die of $CalendarCreateData returns nothing but output of e.g. > $CalendarCreateData->get_GroupID shows that the value is set (1000). > > For finding out which method are valid its shown > > Can't locate object method "set_GsroupID" via package > "CP_SharePoint::ChangeManagement::CalendarCreateData". > Valid methods are: > at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/XSD/Typelib/ComplexType.pm > line 61 > > Thats why we think that parent attributes are all ignored, for method > output and for XML-Serialization. > The inheritance was generated automatically by wsdl2perl > > --- > Perl v5.8.8 built for x86_64-linux-thread-multi > Linux 2.6.18-92.1.1.el5 #1 SMP Thu May 22 09:01:47 EDT 2008 x86_64 > x86_64 x86_64 GNU/Linux
From: colin.hotzky.ext [...] siemens.com
Hi Martin here is the WSDL I am using version SOAP::WSDL 2.00.05 Thanks, Colin On Di. 04. Nov. 2008, 08:31:13, martin.kutter@fen-net.de wrote: Show quoted text
> Hi Colin, > > SOAP::WSDL's XSD generator should flatten out inheritance - i.e. > inherited members should be repeated in the derived classes. This > apparently is not the case in the examples you provided - which probably > means something's wrong in the generator code. > > Which version are you using? > > Could you provide the WSDL? > > Thanks, > > Martin > > Am Dienstag, den 04.11.2008, 05:41 -0500 schrieb > colin.hotzky.ext@siemens.com via RT:
> > Tue Nov 04 05:41:21 2008: Request 40650 was acted upon. > > Transaction: Ticket created by colin.hotzky.ext@siemens.com > > Queue: SOAP-WSDL > > Subject: Deserialization on inherited types > > Broken in: 2.00_05 > > Severity: Important > > Owner: Nobody > > Requestors: colin.hotzky.ext@siemens.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40650 > > > > > > > When having a type inherited from another type that is inhertied from > > ComplexType then the parent (XML-)Elements are not serialized > > e.g. see files in attachement plus following call: > > > > my $CalendarCreateData = > > CP_SharePoint::ChangeManagement::CalendarCreateData->new(); > > > > $CalendarCreateData->set_GroupID( 1000); > > > > A die of $CalendarCreateData returns nothing but output of e.g. > > $CalendarCreateData->get_GroupID shows that the value is set (1000). > > > > For finding out which method are valid its shown > > > > Can't locate object method "set_GsroupID" via package > > "CP_SharePoint::ChangeManagement::CalendarCreateData". > > Valid methods are: > > at /usr/lib/perl5/site_perl/5.8.8/SOAP/WSDL/XSD/Typelib/ComplexType.pm > > line 61 > > > > Thats why we think that parent attributes are all ignored, for method > > output and for XML-Serialization. > > The inheritance was generated automatically by wsdl2perl > > > > --- > > Perl v5.8.8 built for x86_64-linux-thread-multi > > Linux 2.6.18-92.1.1.el5 #1 SMP Thu May 22 09:01:47 EDT 2008 x86_64 > > x86_64 x86_64 GNU/Linux
>

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #40650] Deserialization on inherited types
Date: Tue, 04 Nov 2008 17:51:57 +0100
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Hi Colin, the inherited complexType variety (sequence/all/choice...) did not get propagated to derived complexTypes. Thus, derived complexTypes which did not add elements lost all inherited elements. The error is fixed in SVN in rev747 Martin
From: colin.hotzky.ext [...] siemens.com
Hello Martin I just checked out the new version and generated new modules. The bug is fixed. Thanx for your fast help. Colin