Subject: | Complex Types are not properly annotated |
When serializing a complex type the actual type name from the WSDL is
not defined on sub nodes. So far this has not caused an issue, except
with the reporting bindpoint that will return an internal server error
unless the reportRequest node is actually types to the
BasicReportRequest type.
The subroutine _serialize_complex_type in Service.pm can be replaced
with the following code to fix this issue:
sub _serialize_complex_type {
my ( $self, $complex_type ) = @_;
ref( $complex_type ) =~ m/Yahoo::Marketing::ComplexType::(.*)/;
my $type = $1;
return \SOAP::Data->value( map { $self->_serialize_argument( $_,
$complex_type->$_ )
}
grep { defined $complex_type->$_ }
$complex_type->_user_setable_attributes
)->type( $type );
}