#110 Can't call method "name" ...error

closed-fixed
Martin Kutter
WSDL (18)
6
2008-07-09
2006-08-04
Jojo Lechelt
No

When using SOAP::Lite->service($wsdl) with a wsdl in
document-style, an error occurs:

Can't call method "name" without a package or object
reference at
c:/Programme/perl/site/5.8.6/lib/SOAP/Lite.pm line 2995

If I remove the comment (#) before "next unless $_;" in
line 2994 in Lite.pm (Version 1.41), it works well.

The complete line including the comment at the
beginning appeared in version 1.33 of the file:

2994 : byrnereese 1.33 # next unless $_;

What is the matter here?

Discussion

  • Logged In: YES
    user_id=1459777
    Originator: NO

    I have found exactly the same problem and solution in version 0.69. I've done some 'quick and dirty' tests and it looks like the array for the foreach loop only contains 'bless' function references, these then contain the parameters that were passed in to create the service. Once the next unless is uncommented the loop never does anything... I am calling the function as follows:

    my $service = SOAP::Lite->service('https://XXXXXX')
    ->xmlschema('http://www.w3.org/2001/XMLSchema')
    ->encoding('utf-8')
    ->on_action( sub { join '/', 'https://XXXXXX', $_[1] } )
    ->proxy('https://XXXXXXXXXXXX')
    ->uri('https://XXXXXX');

     
  • Martin Kutter
    Martin Kutter
    2007-10-04

    • priority: 5 --> 8
    • assigned_to: byrnereese --> kutterma
     
  • Martin Kutter
    Martin Kutter
    2007-10-04

    • assigned_to: kutterma --> byrnereese
    • priority: 8 --> 6
     
  • Logged In: NO

    Same problem and work-around with 0.70-3:

    --- Lite.pm 2007-11-18 13:53:46.000000000 -0500
    +++ /usr/local/share/perl/5.8.8/SOAP/Lite.pm 2008-01-14
    12:30:21.000000000 -0500
    @@ -3204,7 +3204,7 @@
    }
    $self->{'_stub'} .= " parameters => [\n";
    foreach (@{$services->{$service}{parameters}}) {
    -# next unless $_;
    + next unless $_;
    $self->{'_stub'} .= " SOAP::Data->new(name =>
    '".$_->name."', type => '".$_->type."', attr => {";
    $self->{'_stub'} .= do { my %attr = %{$_->attr};
    join(', ', map {"'$_' => '$attr{$_}'"}

     
  • Martin Kutter
    Martin Kutter
    2008-02-29

    • assigned_to: byrnereese --> kutterma
     
  • Martin Kutter
    Martin Kutter
    2008-06-24

    • status: open --> pending-fixed
     
    • status: pending-fixed --> closed-fixed
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).