Skip Menu |

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

Report information
The Basics
Id: 18575
Status: rejected
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: tepeds [...] muohio.edu
Cc:
AdminCc:

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



Subject: SOAP::Lite and Thread::Tie
perl v5.8.6 built for darwin-thread-multi-2level Mac OS X, 10.4.5 $SOAP::Lite::VERSION 0.60 I am working on a application which uses Thread::Pool to manage worker threads collecting and updating information using SOAP::Lite. This was working fine until I ran into a SOAP server using Java. My function calls would simple cause the SOAP client to die. No errors, nothing. I was able to isolate the problem to the use of the Thread::Tie module (used by the Thread::Conveyor module which is used by the Thread::Pool module). Within the SOAP::Lite decode_value method, I found line 1885: undef $class if $schemaclass->can('anyTypeValue') && $schemaclass->anyTypeValue eq $class; dies unexpectedly on the $schemaclass->can() method call. The $schemaclass variable appears to be a scalar, not an object array. I'm not familiar with how this is supposed to work at that point in the code, I'm just going by what I was able to determine with limited testing. I was able to resolve the problem to my satisfaction by adding a ref check in the condition as: undef $class if ref $schemaclass && $schemaclass->can('anyTypeValue') && $schemaclass->anyTypeValue eq $class; I hope this helps you, I really want to be able to use SOAP::Lite with the thread pool module with SOAP::Lite for this project.
Hi, sorry for the late reply - SOAP::Lite maintenance has changed since. Your solution breaks a unit test in 0.70_02. The $schemaclass->can() call is perfectly valid on scalars (which are then regarded as class names), the only condition where it throws an exception is when $schemaclass is undef. $schemaclass is assigned the following value before: my $schemaclass = defined($schema) && $self->xmlschemas->{$schema} || $self; which means it can only be undef if $self is undef - in this case somebody would have called the containing method (decode_value) as function with undef as first parameter (which then would be the real bug). To me it looks like there's trouble with the threading in this case - not with SOAP::Lite. Maybe you did not share the soap object properly between threads? Regards, Martin