Skip Menu |

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

Report information
The Basics
Id: 33222
Status: new
Priority: 0/
Queue: SOAP-Lite

Owner: Nobody in particular
Requestors: d.rowles [...]

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

Subject: Multiple array-refs in SOAP calls
Date: Wed, 13 Feb 2008 17:54:58 +0000
To: bug-SOAP-Lite [...]
From: Dan Rowles <d.rowles [...]>
Download (untitled) / with headers
text/plain 1.4k
Hello, There is a bug in SOAP::Lite version 0.69 that is not present in version 0.60a, which occurs when you pass two array-refs as the arguments to a function over SOAP. I have included some scripts with this email to demonstrate the problem. The attached "" script starts up a daemon, listening on port 10000, which will accept SOAP requests from a client. Only one method is provided, "echo", which returns whatever arguments it is given. The "" script connects to the server, and calls the "echo" method, passing in four arguments, which are as follows:- my @args = ("hi", ["bob", "bobbage"], ["jim", "jimmage"], "bye"); To run these scripts:- $ perl & $ perl Under SOAP::Lite 0.60a, the following (correct) output appears:- $VAR1 = 'hi'; $VAR2 = [ 'bob', 'bobbage' ]; $VAR3 = [ 'jim', 'jimmage' ]; $VAR4 = 'bye'; Under SOAP::Lite 0.69, the following (invalid) output appears:- $VAR1 = 'hi'; $VAR2 = [ 'bob', 'bobbage', [ 'jim', 'jimmage' ], $VAR2->[2] ]; $VAR3 = $VAR2->[2]; $VAR4 = 'bye'; The third attached file, "", demonstrates the bug using just the SOAP::Serializer and SOAP::Deserializer classes (without needing to start a SOAP server). Thanks, -- Dan Rowles Outcome Technologies Ltd BUPA House, 15-19 Bloomsbury Way, London WC1A 2BA Registered in England, No: 3829851
text/x-perl 521b
#! /usr/bin/perl use strict; use warnings; use Data::Dumper; use SOAP::Transport::HTTP; my $daemon = SOAP::Transport::HTTP::Daemon->new( LocalAddr => "", LocalPort => 10000, Reuse => 1, ); $daemon->dispatch_to("My::Test::Class"); $daemon->serializer->readable(1); $daemon->handle; package My::Test::Class; sub echo { my($class, @args) = @_; print STDERR "CALLED THE 'echo()' method ($class)\n"; print STDERR " ARGS: ", Data::Dumper::Dumper(@args), " +DONE\n"; return @args; } 1; __END__
text/x-perl 546b
#! /usr/bin/perl use strict; use warnings; use SOAP::Lite; use Data::Dumper; my $soap = SOAP::Lite->new(); my $xmlns = "http://localhost/My/Test/Class"; $soap->proxy("http://localhost:10000"); $soap->uri($xmlns); $soap->readable(1); my $meth = "echo"; my @args = ("hi", ["bob", "bobbage"], ["jim", "jimmage"], "bye"); my $resp = $soap->call($meth, @args); unless($resp && ref($resp) && $resp->isa("SOAP::SOM")) { die "Invalid response: ", Dumper($resp); } my @res = $resp->paramsall; print "GOT: ", Dumper(@res), " +DONE\n"; exit 0;
text/x-perl 1.4k
#! /usr/bin/perl use strict; use warnings; use Data::Dumper; use SOAP::Lite; my $xml = <<""; <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="" xmlns:soapenc="" xmlns:xsd="" soap:encodingStyle="" xmlns:soap=""> <soap:Body> <echo xmlns="http://localhost/My/Test/Class"> <!-- soapenc:arrayType="xsd:anyType[4]" xsi:type="soapenc:Array"> --> <c-gensym3 xsi:type="xsd:string">hi</c-gensym3> <soapenc:Array soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"> <item xsi:type="xsd:string">bob</item> <item xsi:type="xsd:string">bobbage</item> </soapenc:Array> <soapenc:Array soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"> <item xsi:type="xsd:string">jim</item> <item xsi:type="xsd:string">jimmage</item> </soapenc:Array> <c-gensym7 xsi:type="xsd:string">bye</c-gensym7> </echo> </soap:Body> </soap:Envelope> my $deser = SOAP::Deserializer->new(); $deser->hrefs({}); $deser->ids({}); my $parsed = $deser->decode($xml); $deser->ids($parsed); my $tmp = $deser->decode_object($parsed); die Dumper($tmp, $parsed); my $som = SOAP::Deserializer->deserialize($xml); my @res = $som->paramsall; print "GOT: ", Dumper(@res), " +DONE\n"; exit 0;

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

Please report any issues with to