Skip Menu |
 

This queue is for tickets about the XMLRPC-Lite CPAN distribution.

Report information
The Basics
Id: 120545
Status: new
Priority: 0/
Queue: XMLRPC-Lite

People
Owner: Nobody in particular
Requestors: jmfernandez [...] cnio.es
Cc:
AdminCc:

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



Subject: XMLRPC::Lite does not support serializing <nil/>
Download (untitled) / with headers
text/plain 733b
Meanwhile I was testing an XML-RPC service which allows <nil/> as parameter, I realized XMLRPC::Lite does not support serializing them. I tried using undef values a parameter, but they were silently discarded, so the service complained about the number of parameters. Digging into the XMLRPC::Lite and SOAP::Lite source codes, I realized that a patch to gain <nil/> serialization is as easy as implementing xmlize method on XMLRPC::Serializer: package XMLRPC::Serializer; sub xmlize { my $self = shift; my($name, $attrs, $values, $id) = @{$_[0]}; $attrs ||= {}; return $self->SUPER::xmlize(@_) if(defined($values)); local $self->{_level} = $self->{_level} + 1; return $self->tag($name, $attrs,$self->tag('nil')); }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.