Loading ...
Sorry, an error occurred while loading the content.

5077Re: v0.66: use_prefix deprecated and services via WSDL

Expand Messages
  • cubrewer
    Dec 29, 2005
    • 0 Attachment
      --- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:

      > In summary, the autogenerated code stubs created by SOAP::Lite
      > (actually) should not reference these deprecated methods. So if it is,
      > then there is a problem that must be resolved. But please consult the

      Byrne,

      I'm having this trouble too after examining the pages you reference.
      I'm using the 3-line client code directly from the documentation. The
      relevant line is:

      print SOAP::Lite
      -> uri('http://www.soaplite.com/Demo')
      -> proxy('http://services.soaplite.com/hibye.cgi')
      -> hi()
      -> result;

      And the warning is generated at line 858 of Lite.pm which is inside
      use_prefix()... So, clearly, use_prefix() is being called but not
      directly by me.

      Anyway, if I look for instances of use_prefix() in Lite.pm I see that
      uri() uses it on the sixth line (line 884):

      sub uri {
      my $self = shift->new;
      # warn 'uri has been deprecated. if you wish to set the [...]
      if (@_) {
      $self->{'_ns_uri'} = shift;
      $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);
      return $self;
      }
      return $self->{'_ns_uri'};
      }

      If I just comment out this call to use_prefix() then all is well with
      the client. Change:

      $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);

      to

      $self->register_ns($self->{'_ns_uri'});

      But I have no idea what your code is doing! Clearly uri() is calling
      the deprecated use_prefix() on line 884 in error, but I don't know if
      my change breaks your code...

      Please have pity on a newbie and let me know if this is sane or if
      there is a better approach to quashing this annoying warning.

      -Alan
    • Show all 15 messages in this topic