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

v0.66: use_prefix deprecated and services via WSDL

Expand Messages
  • Dan Horne
    Running the standard web service example from the doco: #!/usr/local/bin/perl use SOAP::Lite; print SOAP::Lite -
    Message 1 of 15 , Dec 28, 2005
    • 0 Attachment
      Running the standard web service example from the doco:

      #!/usr/local/bin/perl
      use SOAP::Lite;
      print SOAP::Lite
      -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
      -> getQuote('MSFT');

      And the warnings return:

      use_prefix has been deprecated. if you wish to turn off or on the use of a
      default namespace, then please use either ns(uri) or default_ns(uri) at
      /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.

      It's not clear to me how I use ns or default_ns in this instance.

      Regards

      Dan Horne
    • Eadon, Bryant
      I am having a similar problem and sent a mail off to paulclinger@yahoo.com , but I ll post here too. --CUT-- Paul, First off,
      Message 2 of 15 , Dec 29, 2005
      • 0 Attachment
        I am having a similar problem and sent a mail off to paulclinger@... , but I'll post here too.
         
        --CUT--
         
        Paul,
         
            First off, thanks for making a great tool !  Secondly, I notice there was a very recent update to this, and perhaps that's why tutorials for writing things using this with and the Google API are failing.  ( my version is # $Id: Lite.pm,v 1.37 2005/12/25 07:52:18 byrnereese Exp $ ).
         
        Specifically I get " use_prefix has been deprecated. if you wish to turn off or on the use of a default namespace, then please use either ns(uri) or default_ns(uri) at /home/beadon1/perl587/lib/site_perl/5.8.7/SOAP/Lite.pm line 858. "
         
        But I can't tell what line call is causing this error.  As far as I can see it's the call indicated below.   I snipped the lines from the google API for you to take a look at too.
         
        I've HTML formatted this to make the code and comments stand out a little better, so if you're using a text only reader, it might look better in a web browser.
         
        ---------------------------------------------
        #!/usr/bin/perl
        use strict;
         
        # Use the SOAP::Lite Perl module.
        use SOAP::Lite;
         
        $ENV{HTTP_proxy}='http://web.site:8080';  <---  it seems you grab "http_proxy" now which requires "http://" leading (LWP doing this?)

        # Location of the GoogleSearch WSDL file.
        my $google_wdsl = "./GoogleSearch.wsdl";
         
        # Your Google API developer's key.
        my $google_key='00000000000000000000000';
         
        # Take the query from the command line.
        my $query = shift @ARGV or die "Usage: perl googly.pl <query>\n";
         
        # Create a new SOAP::Lite instance, feeding it GoogleSearch.wsdl.
        my $google_search = SOAP::Lite->service("file:$google_wdsl");
         
        # Query Google.  ---------------------------THE CALL BELOW SEEMS TO THROW AN ERROR
        my $results = $google_search ->
            doGoogleSearch(
              $google_key, $query, 0, 10, "false", "",  "false",
              "", "latin1", "latin1");
         
        --------------------  Can I specifically set a proxy for this service to do the query instead of an ENV variable?  I tried .. but it seems to have taken the ENV{} flags over the ->proxy => definition.
         
        print "About $results->{'estimatedTotalResultsCount'} results.\n";
         
        # No results?
        @{$results->{resultElements}} or exit;
         
        # Loop through the results.
        foreach my $result (@{$results->{resultElements}}) {
         # Print out the main bits of each result
         print
          join "\n",
          $result->{URL},
          $result->{snippet} || 'no snippet',
          "\n";
        }

        ------------------------------------------------------
         
          <message name="doGoogleSearch">
            <part name="key"            type="xsd:string"/>
            <part name="q"              type="xsd:string"/>
            <part name="start"          type="xsd:int"/>
            <part name="maxResults"     type="xsd:int"/>
            <part name="filter"         type="xsd:boolean"/>
            <part name="restrict"       type="xsd:string"/>
            <part name="safeSearch"     type="xsd:boolean"/>
            <part name="lr"             type="xsd:string"/>
            <part name="ie"             type="xsd:string"/>
            <part name="oe"             type="xsd:string"/>
          </message>
        .
        .
        .
         
            <operation name="doGoogleSearch">
              <input message="typens:doGoogleSearch"/>
              <output message="typens:doGoogleSearchResponse"/>
            </operation>
        .
        .
        .
         
            <operation name="doGoogleSearch">
              <soap:operation soapAction="urn:GoogleSearchAction"/>
              <input>
                <soap:body use="encoded"
                           namespace="urn:GoogleSearch"
                           encodingStyle="
        http://schemas.xmlsoap.org/soap/encoding/"/>
              </input>
              <output>
                <soap:body use="encoded"
                           namespace="urn:GoogleSearch"
                           encodingStyle="
        http://schemas.xmlsoap.org/soap/encoding/"/>
              </output>
            </operation>
         
        ---------------------------------------------------
         
        Schema files ... you can grab ..   but I haven't the faintest idea where use_prefix is actually getting called. ... chugging through some of the code I think it's flowing from fixattrs()  which calls   my($xmlns, $prefix) = ($data->uri, $data->prefix);     on line 1279.   and more likely line 884 :   $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);
        There's also a call to uri on 1388 , 1390, 1392, 2535, 2553, 2782, 2824, 3008, 3077, 3097, 3358, 609 -- but this crosses package limits.  So I'm not exactly where the error is being called.  Can you help nail down why this error is being displayed ? 
         
        Thanks,
         
        Bryant Eadon                
         
        --CUT--
        -----Original Message-----
        From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com]On Behalf Of Dan Horne
        Sent: Thursday, December 29, 2005 1:03 AM
        To: soaplite@yahoogroups.com
        Subject: [soaplite] v0.66: use_prefix deprecated and services via WSDL

        Running the standard web service example from the doco:

        #!/usr/local/bin/perl
        use SOAP::Lite;
        print SOAP::Lite
          -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
          -> getQuote('MSFT');

        And the warnings return:

        use_prefix has been deprecated. if you wish to turn off or on the use of a
        default namespace, then please use either ns(uri) or default_ns(uri) at
        /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.

        It's not clear to me how I use ns or default_ns in this instance.

        Regards

        Dan Horne

        ==============================================================================
        Please access the attached hyperlink for an important electronic communications disclaimer:

        http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

        ==============================================================================

      • Eric Bridger
        Not really sure but you could try: SOAP::Lite- service(...) - use_prefix(0) Also see: SOAP::Lite- serializer- register_ns(namespace, prefix); Eric
        Message 3 of 15 , Dec 29, 2005
        • 0 Attachment
          Not really sure but you could try:

          SOAP::Lite->service(...)
          ->use_prefix(0)

          Also see:

          SOAP::Lite->serializer->register_ns(namespace, prefix);

          Eric

          On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
          > Running the standard web service example from the doco:
          >
          > #!/usr/local/bin/perl
          > use SOAP::Lite;
          > print SOAP::Lite
          > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
          > -> getQuote('MSFT');
          >
          > And the warnings return:
          >
          > use_prefix has been deprecated. if you wish to turn off or on the use of a
          > default namespace, then please use either ns(uri) or default_ns(uri) at
          > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
          >
          > It's not clear to me how I use ns or default_ns in this instance.
          >
          > Regards
          >
          > Dan Horne
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
        • Byrne Reese
          I am sorry you guys are experiencing problems. I had a feeling this was going to trip people up, which is why I documented this change so thoroughly. The
          Message 4 of 15 , Dec 29, 2005
          • 0 Attachment
            I am sorry you guys are experiencing problems. I had a feeling this was
            going to trip people up, which is why I documented this change so
            thoroughly. The following blog post should hopefully clear things up --
            knock on wood.

            http://www.soaplite.com/2005/04/tturitt_and_ttu.html

            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
            following man page, which has more details about the latest changes to
            SOAP::Lite's APIs in regards to WSDL:

            http://www.majordojo.com/soaplite/docs/Schema.html

            You can actually cache, or save the generated code stubs - or print them
            to the screen. If you are having problems with a specific web service,
            by all means, forward your code to this mailing list, and I or someone
            else should be able to help.

            Byrne
            Lead Developer, SOAP::Lite

            Eric Bridger wrote:
            > Not really sure but you could try:
            >
            > SOAP::Lite->service(...)
            > ->use_prefix(0)
            >
            > Also see:
            >
            > SOAP::Lite->serializer->register_ns(namespace, prefix);
            >
            > Eric
            >
            > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
            > > Running the standard web service example from the doco:
            > >
            > > #!/usr/local/bin/perl
            > > use SOAP::Lite;
            > > print SOAP::Lite
            > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
            > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
            > > -> getQuote('MSFT');
            > >
            > > And the warnings return:
            > >
            > > use_prefix has been deprecated. if you wish to turn off or on the
            > use of a
            > > default namespace, then please use either ns(uri) or default_ns(uri) at
            > > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
            > >
            > > It's not clear to me how I use ns or default_ns in this instance.
            > >
            > > Regards
            > >
            > > Dan Horne
            > >
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            >
            >
            >
            > ------------------------------------------------------------------------
            > YAHOO! GROUPS LINKS
            >
            > * Visit your group "soaplite
            > <http://groups.yahoo.com/group/soaplite>" on the web.
            >
            > * To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            >
            > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            > Service <http://docs.yahoo.com/info/terms/>.
            >
            >
            > ------------------------------------------------------------------------
            >
          • cubrewer
            ... 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
            Message 5 of 15 , 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
            • cubrewer
              ... I guess the issue is that uri() is depreacted as well and if you substitute ns() or default_ns() for uri() then all is well: print SOAP::Lite -
              Message 6 of 15 , Dec 29, 2005
              • 0 Attachment
                --- In soaplite@yahoogroups.com, "cubrewer" <cubrewer@y...> wrote:

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

                I guess the issue is that uri() is depreacted as well and if you
                substitute ns() or default_ns() for uri() then all is well:

                print SOAP::Lite
                -> ns('http://www.soaplite.com/Demo')
                ...

                -Alan
              • Dan Horne
                Hi Byrne I m afraid that I haven t been able to make much progress. The code from the generated stub makes no explicit reference to use_prefix (I ve pasted
                Message 7 of 15 , Dec 29, 2005
                • 0 Attachment
                  Hi Byrne

                  I'm afraid that I haven't been able to make much progress. The code from the
                  generated stub makes no explicit reference to "use_prefix" (I've pasted the
                  stub below). I tried following the SOAP::Lite code around to try and figure
                  out where use_prefix may be called, but I got lost in all of the AUTOLOADs
                  and dynamic methods, I'm afraid.

                  As a side note, following the POD doco for generating stubs doesn't work
                  (unless I've misunderstood the doco). SOAP Lite tries calling the stub
                  method on the remote web service:

                  # ./stub.pl
                  Unrecognized method 'stub'. List of available method(s): getQuote

                  stub.pl:

                  #!/usr/local/bin/perl
                  use SOAP::Lite;
                  my $client = SOAP::Lite->new;
                  my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                  my $code = $client->service($wsdl)->stub;

                  This works:

                  #!/usr/local/bin/perl
                  use SOAP::Lite;
                  my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                  print SOAP::Schema->new->schema_url($wsdl)->parse->load->stub;

                  The generated stub:

                  package net_xmethods_services_stockquote_StockQuoteService;
                  # Generated by SOAP::Lite (v0.66) for Perl -- soaplite.com
                  # Copyright (C) 2000-2004 Paul Kulchenko
                  # -- generated at [Fri Dec 30 11:16:00 2005]
                  # -- generated from http://www.xmethods.net/sd/StockQuoteService.wsdl
                  my %methods = (
                  getQuote => {
                  endpoint => 'http://services.xmethods.net/soap',
                  soapaction => 'urn:xmethods-delayed-quotes#getQuote',
                  uri => 'urn:xmethods-delayed-quotes',
                  parameters => [
                  SOAP::Data->new(name => 'symbol', type => 'xsd:string', attr => {}),
                  ], # end parameters
                  }, # end getQuote
                  ); # end my %methods

                  use SOAP::Lite;
                  use Exporter;
                  use Carp ();

                  use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
                  @ISA = qw(Exporter SOAP::Lite);
                  @EXPORT_OK = (keys %methods);
                  %EXPORT_TAGS = ('all' => [@EXPORT_OK]);

                  sub _call {
                  my ($self, $method) = (shift, shift);
                  my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name :
                  $method;
                  my %method = %{$methods{$name}};
                  $self->proxy($method{endpoint} || Carp::croak "No server address (proxy)
                  specified")
                  unless $self->proxy;
                  my @templates = @{$method{parameters}};
                  my @parameters = ();
                  foreach my $param (@_) {
                  if (@templates) {
                  my $template = shift @templates;
                  my ($prefix,$typename) = SOAP::Utils::splitqname($template->type);
                  my $method = 'as_'.$typename;
                  # TODO - if can('as_'.$typename) {...}
                  my $result = $self->serializer->$method($param, $template->name,
                  $template->type, $template->attr);
                  push(@parameters, $template->value($result->[2]));
                  } else {
                  push(@parameters, $param);
                  }
                  }
                  $self->endpoint($method{endpoint})
                  ->uri($method{uri})
                  ->on_action(sub{qq!"$method{soapaction}"!});

                  $self->serializer->register_ns("http://www.themindelectric.com/","electric")
                  ;

                  $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/","soap
                  ");
                  $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/","wsdl");

                  $self->serializer->register_ns("http://schemas.xmlsoap.org/soap/encoding/","
                  soapenc");

                  $self->serializer->register_ns("http://www.themindelectric.com/wsdl/net.xmet
                  hods.services.stockquote.StockQuote/","tns");
                  $self->serializer->register_ns("http://www.w3.org/2001/XMLSchema","xsd");
                  my $som = $self->SUPER::call($method => @parameters);
                  if ($self->want_som) {
                  return $som;
                  }
                  UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall :
                  $som->result : $som;
                  }

                  sub BEGIN {
                  no strict 'refs';
                  for my $method (qw(want_som)) {
                  my $field = '_' . $method;
                  *$method = sub {
                  my $self = shift->new;
                  @_ ? ($self->{$field} = shift, return $self) : return $self->{$field};
                  }
                  }
                  }
                  no strict 'refs';
                  for my $method (@EXPORT_OK) {
                  my %method = %{$methods{$method}};
                  *$method = sub {
                  my $self = UNIVERSAL::isa($_[0] => __PACKAGE__)
                  ? ref $_[0] ? shift # OBJECT
                  # CLASS, either get self or create new and assign to self
                  : (shift->self || __PACKAGE__->self(__PACKAGE__->new))
                  # function call, either get self or create new and assign to self
                  : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new));
                  $self->_call($method, @_);
                  }
                  }

                  sub AUTOLOAD {
                  my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
                  return if $method eq 'DESTROY' || $method eq 'want_som';
                  die "Unrecognized method '$method'. List of available method(s):
                  @EXPORT_OK\n";
                  }

                  1;

                  Thanks

                  Dan Horne
                  > -----Original Message-----
                  > From: Byrne Reese [mailto:byrne@...]
                  > Sent: Friday, 30 December 2005 04:58
                  > To: Eric Bridger
                  > Cc: Dan Horne; soaplite@yahoogroups.com
                  > Subject: Re: [soaplite] v0.66: use_prefix deprecated and
                  > services via WSDL
                  >
                  >
                  > I am sorry you guys are experiencing problems. I had a
                  > feeling this was
                  > going to trip people up, which is why I documented this change so
                  > thoroughly. The following blog post should hopefully clear
                  > things up --
                  > knock on wood.
                  >
                  > http://www.soaplite.com/2005/04/tturitt_and_ttu.html
                  >
                  > 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
                  > following man page, which has more details about the latest
                  > changes to
                  > SOAP::Lite's APIs in regards to WSDL:
                  >
                  > http://www.majordojo.com/soaplite/docs/Schema.html
                  >
                  > You can actually cache, or save the generated code stubs - or
                  > print them
                  > to the screen. If you are having problems with a specific web
                  > service,
                  > by all means, forward your code to this mailing list, and I
                  > or someone
                  > else should be able to help.
                  >
                  > Byrne
                  > Lead Developer, SOAP::Lite
                  >
                  > Eric Bridger wrote:
                  > > Not really sure but you could try:
                  > >
                  > > SOAP::Lite->service(...)
                  > > ->use_prefix(0)
                  > >
                  > > Also see:
                  > >
                  > > SOAP::Lite->serializer->register_ns(namespace, prefix);
                  > >
                  > > Eric
                  > >
                  > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                  > > > Running the standard web service example from the doco:
                  > > >
                  > > > #!/usr/local/bin/perl
                  > > > use SOAP::Lite;
                  > > > print SOAP::Lite
                  > > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                  > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                  > > > -> getQuote('MSFT');
                  > > >
                  > > > And the warnings return:
                  > > >
                  > > > use_prefix has been deprecated. if you wish to turn off or on the
                  > > use of a
                  > > > default namespace, then please use either ns(uri) or
                  > default_ns(uri)
                  > > > at /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                  > > >
                  > > > It's not clear to me how I use ns or default_ns in this instance.
                  > > >
                  > > > Regards
                  > > >
                  > > > Dan Horne
                  > > >
                  > > >
                  > > >
                  > > >
                  > > >
                  > > > Yahoo! Groups Links
                  > > >
                  > > >
                  > > >
                  > > >
                  > > >
                  > >
                  > >
                  > >
                  > >
                  > ----------------------------------------------------------------------
                  > > --
                  > > YAHOO! GROUPS LINKS
                  > >
                  > > * Visit your group "soaplite
                  > > <http://groups.yahoo.com/group/soaplite>" on the web.
                  > >
                  > > * To unsubscribe from this group, send an email to:
                  > > soaplite-unsubscribe@yahoogroups.com
                  > >
                  > > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
                  > >
                  > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                  > > Service <http://docs.yahoo.com/info/terms/>.
                  > >
                  > >
                  > >
                  > ----------------------------------------------------------------------
                  > > --
                  > >
                  >
                  >
                  >
                • Byrne Reese
                  Damn. Ok. This could be a hack, but let s see if we can t nail this down: Do you see the following code in the stub? $self- endpoint($method{endpoint})
                  Message 8 of 15 , Dec 29, 2005
                  • 0 Attachment
                    Damn. Ok. This could be a hack, but let's see if we can't nail this down:

                    Do you see the following code in the stub?

                    $self->endpoint($method{endpoint})
                    ->uri($method{uri})
                    ->on_action(sub{qq!"$method{soapaction}"!});

                    Try saving the stub to disk and changing that to:

                    $self->endpoint($method{endpoint})
                    ->ns($method{uri})
                    ->on_action(sub{qq!"$method{soapaction}"!});

                    uri() might be making a call to use_prefix... but the use of uri() is
                    deprecated as well. Hmmm.

                    Dan Horne wrote:
                    > Hi Byrne
                    >
                    > I'm afraid that I haven't been able to make much progress. The code
                    > from the
                    > generated stub makes no explicit reference to "use_prefix" (I've
                    > pasted the
                    > stub below). I tried following the SOAP::Lite code around to try and
                    > figure
                    > out where use_prefix may be called, but I got lost in all of the AUTOLOADs
                    > and dynamic methods, I'm afraid.
                    >
                    > As a side note, following the POD doco for generating stubs doesn't work
                    > (unless I've misunderstood the doco). SOAP Lite tries calling the stub
                    > method on the remote web service:
                    >
                    > # ./stub.pl
                    > Unrecognized method 'stub'. List of available method(s): getQuote
                    >
                    > stub.pl:
                    >
                    > #!/usr/local/bin/perl
                    > use SOAP::Lite;
                    > my $client = SOAP::Lite->new;
                    > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                    > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27;>
                    > my $code = $client->service($wsdl)->stub;
                    >
                    > This works:
                    >
                    > #!/usr/local/bin/perl
                    > use SOAP::Lite;
                    > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                    > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27;>
                    > print SOAP::Schema->new->schema_url($wsdl)->parse->load->stub;
                    >
                    > The generated stub:
                    >
                    > package net_xmethods_services_stockquote_StockQuoteService;
                    > # Generated by SOAP::Lite (v0.66) for Perl -- soaplite.com
                    > # Copyright (C) 2000-2004 Paul Kulchenko
                    > # -- generated at [Fri Dec 30 11:16:00 2005]
                    > # -- generated from http://www.xmethods.net/sd/StockQuoteService.wsdl
                    > my %methods = (
                    > getQuote => {
                    > endpoint => 'http://services.xmethods.net/soap',
                    > <http://services.xmethods.net/soap%27,>
                    > soapaction => 'urn:xmethods-delayed-quotes#getQuote',
                    > uri => 'urn:xmethods-delayed-quotes',
                    > parameters => [
                    > SOAP::Data->new(name => 'symbol', type => 'xsd:string', attr => {}),
                    > ], # end parameters
                    > }, # end getQuote
                    > ); # end my %methods
                    >
                    > use SOAP::Lite;
                    > use Exporter;
                    > use Carp ();
                    >
                    > use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
                    > @ISA = qw(Exporter SOAP::Lite);
                    > @EXPORT_OK = (keys %methods);
                    > %EXPORT_TAGS = ('all' => [@EXPORT_OK]);
                    >
                    > sub _call {
                    > my ($self, $method) = (shift, shift);
                    > my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name :
                    > $method;
                    > my %method = %{$methods{$name}};
                    > $self->proxy($method{endpoint} || Carp::croak "No server address (proxy)
                    > specified")
                    > unless $self->proxy;
                    > my @templates = @{$method{parameters}};
                    > my @parameters = ();
                    > foreach my $param (@_) {
                    > if (@templates) {
                    > my $template = shift @templates;
                    > my ($prefix,$typename) = SOAP::Utils::splitqname($template->type);
                    > my $method = 'as_'.$typename;
                    > # TODO - if can('as_'.$typename) {...}
                    > my $result = $self->serializer->$method($param, $template->name,
                    > $template->type, $template->attr);
                    > push(@parameters, $template->value($result->[2]));
                    > } else {
                    > push(@parameters, $param);
                    > }
                    > }
                    > $self->endpoint($method{endpoint})
                    > ->uri($method{uri})
                    > ->on_action(sub{qq!"$method{soapaction}"!});
                    >
                    > $self->serializer->register_ns("http://www.themindelectric.com/","electric")
                    > ;
                    >
                    > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/","soap
                    > ");
                    >
                    > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/","wsdl");
                    >
                    > $self->serializer->register_ns("http://schemas.xmlsoap.org/soap/encoding/","
                    > soapenc");
                    >
                    > $self->serializer->register_ns("http://www.themindelectric.com/wsdl/net.xmet
                    > hods.services.stockquote.StockQuote/","tns");
                    >
                    > $self->serializer->register_ns("http://www.w3.org/2001/XMLSchema","xsd");
                    > my $som = $self->SUPER::call($method => @parameters);
                    > if ($self->want_som) {
                    > return $som;
                    > }
                    > UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall :
                    > $som->result : $som;
                    > }
                    >
                    > sub BEGIN {
                    > no strict 'refs';
                    > for my $method (qw(want_som)) {
                    > my $field = '_' . $method;
                    > *$method = sub {
                    > my $self = shift->new;
                    > @_ ? ($self->{$field} = shift, return $self) : return
                    > $self->{$field};
                    > }
                    > }
                    > }
                    > no strict 'refs';
                    > for my $method (@EXPORT_OK) {
                    > my %method = %{$methods{$method}};
                    > *$method = sub {
                    > my $self = UNIVERSAL::isa($_[0] => __PACKAGE__)
                    > ? ref $_[0] ? shift # OBJECT
                    > # CLASS, either get self or create new and assign to
                    > self
                    > : (shift->self || __PACKAGE__->self(__PACKAGE__->new))
                    > # function call, either get self or create new and assign to self
                    > : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new));
                    > $self->_call($method, @_);
                    > }
                    > }
                    >
                    > sub AUTOLOAD {
                    > my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
                    > return if $method eq 'DESTROY' || $method eq 'want_som';
                    > die "Unrecognized method '$method'. List of available method(s):
                    > @EXPORT_OK\n";
                    > }
                    >
                    > 1;
                    >
                    > Thanks
                    >
                    > Dan Horne
                    > > -----Original Message-----
                    > > From: Byrne Reese [mailto:byrne@...]
                    > > Sent: Friday, 30 December 2005 04:58
                    > > To: Eric Bridger
                    > > Cc: Dan Horne; soaplite@yahoogroups.com
                    > > Subject: Re: [soaplite] v0.66: use_prefix deprecated and
                    > > services via WSDL
                    > >
                    > >
                    > > I am sorry you guys are experiencing problems. I had a
                    > > feeling this was
                    > > going to trip people up, which is why I documented this change so
                    > > thoroughly. The following blog post should hopefully clear
                    > > things up --
                    > > knock on wood.
                    > >
                    > > http://www.soaplite.com/2005/04/tturitt_and_ttu.html
                    > >
                    > > 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
                    > > following man page, which has more details about the latest
                    > > changes to
                    > > SOAP::Lite's APIs in regards to WSDL:
                    > >
                    > > http://www.majordojo.com/soaplite/docs/Schema.html
                    > >
                    > > You can actually cache, or save the generated code stubs - or
                    > > print them
                    > > to the screen. If you are having problems with a specific web
                    > > service,
                    > > by all means, forward your code to this mailing list, and I
                    > > or someone
                    > > else should be able to help.
                    > >
                    > > Byrne
                    > > Lead Developer, SOAP::Lite
                    > >
                    > > Eric Bridger wrote:
                    > > > Not really sure but you could try:
                    > > >
                    > > > SOAP::Lite->service(...)
                    > > > ->use_prefix(0)
                    > > >
                    > > > Also see:
                    > > >
                    > > > SOAP::Lite->serializer->register_ns(namespace, prefix);
                    > > >
                    > > > Eric
                    > > >
                    > > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                    > > > > Running the standard web service example from the doco:
                    > > > >
                    > > > > #!/usr/local/bin/perl
                    > > > > use SOAP::Lite;
                    > > > > print SOAP::Lite
                    > > > > ->
                    > service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                    > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                    > > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                    > > > > -> getQuote('MSFT');
                    > > > >
                    > > > > And the warnings return:
                    > > > >
                    > > > > use_prefix has been deprecated. if you wish to turn off or on the
                    > > > use of a
                    > > > > default namespace, then please use either ns(uri) or
                    > > default_ns(uri)
                    > > > > at /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                    > > > >
                    > > > > It's not clear to me how I use ns or default_ns in this instance.
                    > > > >
                    > > > > Regards
                    > > > >
                    > > > > Dan Horne
                  • Dan Horne
                    Alas, ns doesn t work - it raises a Java exception at the server end -- but default_ns does. Thanks Dan
                    Message 9 of 15 , Dec 29, 2005
                    • 0 Attachment
                      Alas, ns doesn't work - it raises a Java exception at the server end -- but
                      default_ns does.

                      Thanks

                      Dan

                      > -----Original Message-----
                      > From: Byrne Reese [mailto:byrne@...]
                      > Sent: Friday, 30 December 2005 12:09
                      > To: dan.horne@...
                      > Cc: 'Eric Bridger'; soaplite@yahoogroups.com
                      > Subject: Re: [soaplite] v0.66: use_prefix deprecated and
                      > services via WSDL
                      >
                      >
                      > Damn. Ok. This could be a hack, but let's see if we can't
                      > nail this down:
                      >
                      > Do you see the following code in the stub?
                      >
                      > $self->endpoint($method{endpoint})
                      > ->uri($method{uri})
                      > ->on_action(sub{qq!"$method{soapaction}"!});
                      >
                      > Try saving the stub to disk and changing that to:
                      >
                      > $self->endpoint($method{endpoint})
                      > ->ns($method{uri})
                      > ->on_action(sub{qq!"$method{soapaction}"!});
                      >
                      > uri() might be making a call to use_prefix... but the use of uri() is
                      > deprecated as well. Hmmm.
                      >
                      > Dan Horne wrote:
                      > > Hi Byrne
                      > >
                      > > I'm afraid that I haven't been able to make much progress. The code
                      > > from the
                      > > generated stub makes no explicit reference to "use_prefix" (I've
                      > > pasted the
                      > > stub below). I tried following the SOAP::Lite code around
                      > to try and
                      > > figure
                      > > out where use_prefix may be called, but I got lost in all
                      > of the AUTOLOADs
                      > > and dynamic methods, I'm afraid.
                      > >
                      > > As a side note, following the POD doco for generating stubs doesn't
                      > > work (unless I've misunderstood the doco). SOAP Lite tries
                      > calling the
                      > > stub method on the remote web service:
                      > >
                      > > # ./stub.pl
                      > > Unrecognized method 'stub'. List of available method(s): getQuote
                      > >
                      > > stub.pl:
                      > >
                      > > #!/usr/local/bin/perl
                      > > use SOAP::Lite;
                      > > my $client = SOAP::Lite->new;
                      > > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                      > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27;>
                      > > my $code = $client->service($wsdl)->stub;
                      > >
                      > > This works:
                      > >
                      > > #!/usr/local/bin/perl
                      > > use SOAP::Lite;
                      > > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                      > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27;>
                      > > print SOAP::Schema->new->schema_url($wsdl)->parse->load->stub;
                      > >
                      > > The generated stub:
                      > >
                      > > package net_xmethods_services_stockquote_StockQuoteService;
                      > > # Generated by SOAP::Lite (v0.66) for Perl -- soaplite.com
                      > > # Copyright (C) 2000-2004 Paul Kulchenko
                      > > # -- generated at [Fri Dec 30 11:16:00 2005]
                      > > # -- generated from
                      > http://www.xmethods.net/sd/StockQuoteService.wsdl
                      > > my %methods = (
                      > > getQuote => {
                      > > endpoint => 'http://services.xmethods.net/soap',
                      > > <http://services.xmethods.net/soap%27,>
                      > > soapaction => 'urn:xmethods-delayed-quotes#getQuote',
                      > > uri => 'urn:xmethods-delayed-quotes',
                      > > parameters => [
                      > > SOAP::Data->new(name => 'symbol', type =>
                      > 'xsd:string', attr => {}),
                      > > ], # end parameters
                      > > }, # end getQuote
                      > > ); # end my %methods
                      > >
                      > > use SOAP::Lite;
                      > > use Exporter;
                      > > use Carp ();
                      > >
                      > > use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
                      > > @ISA = qw(Exporter SOAP::Lite);
                      > > @EXPORT_OK = (keys %methods);
                      > > %EXPORT_TAGS = ('all' => [@EXPORT_OK]);
                      > >
                      > > sub _call {
                      > > my ($self, $method) = (shift, shift);
                      > > my $name = UNIVERSAL::isa($method => 'SOAP::Data') ?
                      > $method->name :
                      > > $method;
                      > > my %method = %{$methods{$name}};
                      > > $self->proxy($method{endpoint} || Carp::croak "No server address
                      > > (proxy)
                      > > specified")
                      > > unless $self->proxy;
                      > > my @templates = @{$method{parameters}};
                      > > my @parameters = ();
                      > > foreach my $param (@_) {
                      > > if (@templates) {
                      > > my $template = shift @templates;
                      > > my ($prefix,$typename) =
                      > SOAP::Utils::splitqname($template->type);
                      > > my $method = 'as_'.$typename;
                      > > # TODO - if can('as_'.$typename) {...}
                      > > my $result = $self->serializer->$method($param,
                      > $template->name,
                      > > $template->type, $template->attr);
                      > > push(@parameters, $template->value($result->[2]));
                      > > } else {
                      > > push(@parameters, $param);
                      > > }
                      > > }
                      > > $self->endpoint($method{endpoint})
                      > > ->uri($method{uri})
                      > > ->on_action(sub{qq!"$method{soapaction}"!});
                      > >
                      > >
                      > $self->serializer->register_ns("http://www.themindelectric.com/","elec
                      > > tric")
                      > > ;
                      > >
                      > >
                      > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/"
                      > > ,"soap
                      > > ");
                      > >
                      > >
                      > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/","wsd
                      > > l");
                      > >
                      > >
                      > $self->serializer->register_ns("http://schemas.xmlsoap.org/soap/encodi
                      > > ng/","
                      > > soapenc");
                      > >
                      > >
                      > $self->serializer->register_ns("http://www.themindelectric.com/wsdl/ne
                      > > t.xmet
                      > > hods.services.stockquote.StockQuote/","tns");
                      > >
                      > >
                      > $self->serializer->register_ns("http://www.w3.org/2001/XMLSche
                      > ma","xsd");
                      > > my $som = $self->SUPER::call($method => @parameters);
                      > > if ($self->want_som) {
                      > > return $som;
                      > > }
                      > > UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ?
                      > $som->paramsall :
                      > > $som->result : $som; }
                      > >
                      > > sub BEGIN {
                      > > no strict 'refs';
                      > > for my $method (qw(want_som)) {
                      > > my $field = '_' . $method;
                      > > *$method = sub {
                      > > my $self = shift->new;
                      > > @_ ? ($self->{$field} = shift, return $self) : return
                      > > $self->{$field};
                      > > }
                      > > }
                      > > }
                      > > no strict 'refs';
                      > > for my $method (@EXPORT_OK) {
                      > > my %method = %{$methods{$method}};
                      > > *$method = sub {
                      > > my $self = UNIVERSAL::isa($_[0] => __PACKAGE__)
                      > > ? ref $_[0] ? shift # OBJECT
                      > > # CLASS, either get self or create new
                      > and assign to
                      > > self
                      > > : (shift->self ||
                      > __PACKAGE__->self(__PACKAGE__->new))
                      > > # function call, either get self or create new and
                      > assign to self
                      > > : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new));
                      > > $self->_call($method, @_);
                      > > }
                      > > }
                      > >
                      > > sub AUTOLOAD {
                      > > my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
                      > > return if $method eq 'DESTROY' || $method eq 'want_som';
                      > > die "Unrecognized method '$method'. List of available method(s):
                      > > @EXPORT_OK\n"; }
                      > >
                      > > 1;
                      > >
                      > > Thanks
                      > >
                      > > Dan Horne
                      > > > -----Original Message-----
                      > > > From: Byrne Reese [mailto:byrne@...]
                      > > > Sent: Friday, 30 December 2005 04:58
                      > > > To: Eric Bridger
                      > > > Cc: Dan Horne; soaplite@yahoogroups.com
                      > > > Subject: Re: [soaplite] v0.66: use_prefix deprecated and services
                      > > > via WSDL
                      > > >
                      > > >
                      > > > I am sorry you guys are experiencing problems. I had a
                      > feeling this
                      > > > was going to trip people up, which is why I documented
                      > this change
                      > > > so thoroughly. The following blog post should hopefully clear
                      > > > things up --
                      > > > knock on wood.
                      > > >
                      > > > http://www.soaplite.com/2005/04/tturitt_and_ttu.html
                      > > >
                      > > > 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 following man page, which has more details about the
                      > > > latest changes to
                      > > > SOAP::Lite's APIs in regards to WSDL:
                      > > >
                      > > > http://www.majordojo.com/soaplite/docs/Schema.html
                      > > >
                      > > > You can actually cache, or save the generated code stubs
                      > - or print
                      > > > them to the screen. If you are having problems with a specific web
                      > > > service,
                      > > > by all means, forward your code to this mailing list, and I
                      > > > or someone
                      > > > else should be able to help.
                      > > >
                      > > > Byrne
                      > > > Lead Developer, SOAP::Lite
                      > > >
                      > > > Eric Bridger wrote:
                      > > > > Not really sure but you could try:
                      > > > >
                      > > > > SOAP::Lite->service(...)
                      > > > > ->use_prefix(0)
                      > > > >
                      > > > > Also see:
                      > > > >
                      > > > > SOAP::Lite->serializer->register_ns(namespace, prefix);
                      > > > >
                      > > > > Eric
                      > > > >
                      > > > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                      > > > > > Running the standard web service example from the doco:
                      > > > > >
                      > > > > > #!/usr/local/bin/perl
                      > > > > > use SOAP::Lite;
                      > > > > > print SOAP::Lite
                      > > > > > ->
                      > > service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                      > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                      > > > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                      > > > > > -> getQuote('MSFT');
                      > > > > >
                      > > > > > And the warnings return:
                      > > > > >
                      > > > > > use_prefix has been deprecated. if you wish to turn off or on
                      > > > > > the
                      > > > > use of a
                      > > > > > default namespace, then please use either ns(uri) or
                      > > > default_ns(uri)
                      > > > > > at /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                      > > > > >
                      > > > > > It's not clear to me how I use ns or default_ns in this
                      > > > > > instance.
                      > > > > >
                      > > > > > Regards
                      > > > > >
                      > > > > > Dan Horne
                      >
                      >
                      >
                    • Eric Bridger
                      Just an FYI. The Schema POD has it a bit wrong: Missing the schema object. I got the following to work as expected: my $code = SOAP::Lite- new(service =
                      Message 10 of 15 , Dec 30, 2005
                      • 0 Attachment
                        Just an FYI.
                        The Schema POD has it a bit wrong: Missing the schema object. I got the
                        following to work as expected:

                        my $code = SOAP::Lite->new(service =>
                        'http://www.xmethods.net/sd/StockQuoteService.wsdl')->schema->stub;

                        Eric

                        On Thu, 2005-12-29 at 17:36, Dan Horne wrote:
                        > Hi Byrne
                        >
                        > I'm afraid that I haven't been able to make much progress. The code from the
                        > generated stub makes no explicit reference to "use_prefix" (I've pasted the
                        > stub below). I tried following the SOAP::Lite code around to try and figure
                        > out where use_prefix may be called, but I got lost in all of the AUTOLOADs
                        > and dynamic methods, I'm afraid.
                        >
                        > As a side note, following the POD doco for generating stubs doesn't work
                        > (unless I've misunderstood the doco). SOAP Lite tries calling the stub
                        > method on the remote web service:
                        >
                        > # ./stub.pl
                        > Unrecognized method 'stub'. List of available method(s): getQuote
                        >
                        > stub.pl:
                        >
                        > #!/usr/local/bin/perl
                        > use SOAP::Lite;
                        > my $client = SOAP::Lite->new;
                        > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                        > my $code = $client->service($wsdl)->stub;
                        >
                        > This works:
                        >
                        > #!/usr/local/bin/perl
                        > use SOAP::Lite;
                        > my $wsdl = 'http://www.xmethods.net/sd/StockQuoteService.wsdl';
                        > print SOAP::Schema->new->schema_url($wsdl)->parse->load->stub;
                        >
                        > The generated stub:
                        >
                        > package net_xmethods_services_stockquote_StockQuoteService;
                        > # Generated by SOAP::Lite (v0.66) for Perl -- soaplite.com
                        > # Copyright (C) 2000-2004 Paul Kulchenko
                        > # -- generated at [Fri Dec 30 11:16:00 2005]
                        > # -- generated from http://www.xmethods.net/sd/StockQuoteService.wsdl
                        > my %methods = (
                        > getQuote => {
                        > endpoint => 'http://services.xmethods.net/soap',
                        > soapaction => 'urn:xmethods-delayed-quotes#getQuote',
                        > uri => 'urn:xmethods-delayed-quotes',
                        > parameters => [
                        > SOAP::Data->new(name => 'symbol', type => 'xsd:string', attr => {}),
                        > ], # end parameters
                        > }, # end getQuote
                        > ); # end my %methods
                        >
                        > use SOAP::Lite;
                        > use Exporter;
                        > use Carp ();
                        >
                        > use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
                        > @ISA = qw(Exporter SOAP::Lite);
                        > @EXPORT_OK = (keys %methods);
                        > %EXPORT_TAGS = ('all' => [@EXPORT_OK]);
                        >
                        > sub _call {
                        > my ($self, $method) = (shift, shift);
                        > my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name :
                        > $method;
                        > my %method = %{$methods{$name}};
                        > $self->proxy($method{endpoint} || Carp::croak "No server address (proxy)
                        > specified")
                        > unless $self->proxy;
                        > my @templates = @{$method{parameters}};
                        > my @parameters = ();
                        > foreach my $param (@_) {
                        > if (@templates) {
                        > my $template = shift @templates;
                        > my ($prefix,$typename) = SOAP::Utils::splitqname($template->type);
                        > my $method = 'as_'.$typename;
                        > # TODO - if can('as_'.$typename) {...}
                        > my $result = $self->serializer->$method($param, $template->name,
                        > $template->type, $template->attr);
                        > push(@parameters, $template->value($result->[2]));
                        > } else {
                        > push(@parameters, $param);
                        > }
                        > }
                        > $self->endpoint($method{endpoint})
                        > ->uri($method{uri})
                        > ->on_action(sub{qq!"$method{soapaction}"!});
                        >
                        > $self->serializer->register_ns("http://www.themindelectric.com/","electric")
                        > ;
                        >
                        > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/","soap
                        > ");
                        > $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/","wsdl");
                        >
                        > $self->serializer->register_ns("http://schemas.xmlsoap.org/soap/encoding/","
                        > soapenc");
                        >
                        > $self->serializer->register_ns("http://www.themindelectric.com/wsdl/net.xmet
                        > hods.services.stockquote.StockQuote/","tns");
                        > $self->serializer->register_ns("http://www.w3.org/2001/XMLSchema","xsd");
                        > my $som = $self->SUPER::call($method => @parameters);
                        > if ($self->want_som) {
                        > return $som;
                        > }
                        > UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall :
                        > $som->result : $som;
                        > }
                        >
                        > sub BEGIN {
                        > no strict 'refs';
                        > for my $method (qw(want_som)) {
                        > my $field = '_' . $method;
                        > *$method = sub {
                        > my $self = shift->new;
                        > @_ ? ($self->{$field} = shift, return $self) : return $self->{$field};
                        > }
                        > }
                        > }
                        > no strict 'refs';
                        > for my $method (@EXPORT_OK) {
                        > my %method = %{$methods{$method}};
                        > *$method = sub {
                        > my $self = UNIVERSAL::isa($_[0] => __PACKAGE__)
                        > ? ref $_[0] ? shift # OBJECT
                        > # CLASS, either get self or create new and assign to self
                        > : (shift->self || __PACKAGE__->self(__PACKAGE__->new))
                        > # function call, either get self or create new and assign to self
                        > : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new));
                        > $self->_call($method, @_);
                        > }
                        > }
                        >
                        > sub AUTOLOAD {
                        > my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
                        > return if $method eq 'DESTROY' || $method eq 'want_som';
                        > die "Unrecognized method '$method'. List of available method(s):
                        > @EXPORT_OK\n";
                        > }
                        >
                        > 1;
                        >
                        > Thanks
                        >
                        > Dan Horne
                        > > -----Original Message-----
                        > > From: Byrne Reese [mailto:byrne@...]
                        > > Sent: Friday, 30 December 2005 04:58
                        > > To: Eric Bridger
                        > > Cc: Dan Horne; soaplite@yahoogroups.com
                        > > Subject: Re: [soaplite] v0.66: use_prefix deprecated and
                        > > services via WSDL
                        > >
                        > >
                        > > I am sorry you guys are experiencing problems. I had a
                        > > feeling this was
                        > > going to trip people up, which is why I documented this change so
                        > > thoroughly. The following blog post should hopefully clear
                        > > things up --
                        > > knock on wood.
                        > >
                        > > http://www.soaplite.com/2005/04/tturitt_and_ttu.html
                        > >
                        > > 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
                        > > following man page, which has more details about the latest
                        > > changes to
                        > > SOAP::Lite's APIs in regards to WSDL:
                        > >
                        > > http://www.majordojo.com/soaplite/docs/Schema.html
                        > >
                        > > You can actually cache, or save the generated code stubs - or
                        > > print them
                        > > to the screen. If you are having problems with a specific web
                        > > service,
                        > > by all means, forward your code to this mailing list, and I
                        > > or someone
                        > > else should be able to help.
                        > >
                        > > Byrne
                        > > Lead Developer, SOAP::Lite
                        > >
                        > > Eric Bridger wrote:
                        > > > Not really sure but you could try:
                        > > >
                        > > > SOAP::Lite->service(...)
                        > > > ->use_prefix(0)
                        > > >
                        > > > Also see:
                        > > >
                        > > > SOAP::Lite->serializer->register_ns(namespace, prefix);
                        > > >
                        > > > Eric
                        > > >
                        > > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                        > > > > Running the standard web service example from the doco:
                        > > > >
                        > > > > #!/usr/local/bin/perl
                        > > > > use SOAP::Lite;
                        > > > > print SOAP::Lite
                        > > > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                        > > > <http://www.xmethods.net/sd/StockQuoteService.wsdl%27%29>
                        > > > > -> getQuote('MSFT');
                        > > > >
                        > > > > And the warnings return:
                        > > > >
                        > > > > use_prefix has been deprecated. if you wish to turn off or on the
                        > > > use of a
                        > > > > default namespace, then please use either ns(uri) or
                        > > default_ns(uri)
                        > > > > at /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                        > > > >
                        > > > > It's not clear to me how I use ns or default_ns in this instance.
                        > > > >
                        > > > > Regards
                        > > > >
                        > > > > Dan Horne
                        > > > >
                        > > > >
                        > > > >
                        > > > >
                        > > > >
                        > > > > Yahoo! Groups Links
                        > > > >
                        > > > >
                        > > > >
                        > > > >
                        > > > >
                        > > >
                        > > >
                        > > >
                        > > >
                        > > ----------------------------------------------------------------------
                        > > > --
                        > > > YAHOO! GROUPS LINKS
                        > > >
                        > > > * Visit your group "soaplite
                        > > > <http://groups.yahoo.com/group/soaplite>" on the web.
                        > > >
                        > > > * To unsubscribe from this group, send an email to:
                        > > > soaplite-unsubscribe@yahoogroups.com
                        > > >
                        > > > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
                        > > >
                        > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                        > > > Service <http://docs.yahoo.com/info/terms/>.
                        > > >
                        > > >
                        > > >
                        > > ----------------------------------------------------------------------
                        > > > --
                        > > >
                        > >
                        > >
                        > >
                        >
                      • Eric Bridger
                        Hmmm. This has been an educational thread, but back to the original post yesterday. The code below works as expected with no warnings about use_prefix. ...
                        Message 11 of 15 , Dec 30, 2005
                        • 0 Attachment
                          Hmmm. This has been an educational thread, but back to the original
                          post yesterday. The code below works as expected with no warnings about
                          use_prefix.

                          On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                          > Running the standard web service example from the doco:
                          >
                          > #!/usr/local/bin/perl
                          > use SOAP::Lite;
                          > print SOAP::Lite
                          > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                          > -> getQuote('MSFT');
                          >
                          > And the warnings return:
                          >
                          > use_prefix has been deprecated. if you wish to turn off or on the use
                          of a
                          > default namespace, then please use either ns(uri) or default_ns(uri)
                          at
                          > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                          >
                          > It's not clear to me how I use ns or default_ns in this instance.
                          >
                          > Regards
                          >
                          > Dan Horne
                        • Dan Horne
                          Hi Eric Are you sure? I ve just installed the new 0.66 version SOAP::Lite on three different machines, and all exhibit the behaviour. From the uri method:
                          Message 12 of 15 , Dec 30, 2005
                          • 0 Attachment
                            Hi Eric

                            Are you sure? I've just installed the new 0.66 version SOAP::Lite on three
                            different machines, and all exhibit the behaviour. From the uri method:

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

                            and use_prefix has the warning.

                            Dan

                            > -----Original Message-----
                            > From: Eric Bridger [mailto:eric@...]
                            > Sent: Saturday, 31 December 2005 7:00 a.m.
                            > To: dan.horne@...
                            > Cc: soaplite@yahoogroups.com
                            > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via WSDL
                            >
                            > Hmmm. This has been an educational thread, but back to the original
                            > post yesterday. The code below works as expected with no warnings about
                            > use_prefix.
                            >
                            > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                            > > Running the standard web service example from the doco:
                            > >
                            > > #!/usr/local/bin/perl
                            > > use SOAP::Lite;
                            > > print SOAP::Lite
                            > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                            > > -> getQuote('MSFT');
                            > >
                            > > And the warnings return:
                            > >
                            > > use_prefix has been deprecated. if you wish to turn off or on the use
                            > of a
                            > > default namespace, then please use either ns(uri) or default_ns(uri)
                            > at
                            > > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                            > >
                            > > It's not clear to me how I use ns or default_ns in this instance.
                            > >
                            > > Regards
                            > >
                            > > Dan Horne
                          • Eric Bridger
                            Well I am still using version: .65_6 use SOAP::Lite; print SOAP::Lite - service( http://www.xmethods.net/sd/StockQuoteService.wsdl ) - getQuote( MSFT );
                            Message 13 of 15 , Dec 30, 2005
                            • 0 Attachment
                              Well I am still using version: .65_6
                              use SOAP::Lite;
                              print SOAP::Lite
                              -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                              -> getQuote('MSFT');
                              print "\n";

                              gives no warnings.

                              On Fri, 2005-12-30 at 14:23, Dan Horne wrote:
                              > Hi Eric
                              >
                              > Are you sure? I've just installed the new 0.66 version SOAP::Lite on three
                              > different machines, and all exhibit the behaviour. From the uri method:
                              >
                              > $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);
                              >
                              > and use_prefix has the warning.
                              >
                              > Dan
                              >
                              > > -----Original Message-----
                              > > From: Eric Bridger [mailto:eric@...]
                              > > Sent: Saturday, 31 December 2005 7:00 a.m.
                              > > To: dan.horne@...
                              > > Cc: soaplite@yahoogroups.com
                              > > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via WSDL
                              > >
                              > > Hmmm. This has been an educational thread, but back to the original
                              > > post yesterday. The code below works as expected with no warnings about
                              > > use_prefix.
                              > >
                              > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                              > > > Running the standard web service example from the doco:
                              > > >
                              > > > #!/usr/local/bin/perl
                              > > > use SOAP::Lite;
                              > > > print SOAP::Lite
                              > > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                              > > > -> getQuote('MSFT');
                              > > >
                              > > > And the warnings return:
                              > > >
                              > > > use_prefix has been deprecated. if you wish to turn off or on the use
                              > > of a
                              > > > default namespace, then please use either ns(uri) or default_ns(uri)
                              > > at
                              > > > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                              > > >
                              > > > It's not clear to me how I use ns or default_ns in this instance.
                              > > >
                              > > > Regards
                              > > >
                              > > > Dan Horne
                              >
                            • Dan Horne
                              .65_6 doesn t have this warning
                              Message 14 of 15 , Dec 30, 2005
                              • 0 Attachment
                                .65_6 doesn't have this warning

                                > -----Original Message-----
                                > From: Eric Bridger [mailto:eric@...]
                                > Sent: Saturday, 31 December 2005 8:33 a.m.
                                > To: Dan Horne
                                > Cc: soaplite@yahoogroups.com
                                > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via WSDL
                                >
                                > Well I am still using version: .65_6
                                > use SOAP::Lite;
                                > print SOAP::Lite
                                > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                                > -> getQuote('MSFT');
                                > print "\n";
                                >
                                > gives no warnings.
                                >
                                > On Fri, 2005-12-30 at 14:23, Dan Horne wrote:
                                > > Hi Eric
                                > >
                                > > Are you sure? I've just installed the new 0.66 version SOAP::Lite on
                                > three
                                > > different machines, and all exhibit the behaviour. From the uri method:
                                > >
                                > > $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);
                                > >
                                > > and use_prefix has the warning.
                                > >
                                > > Dan
                                > >
                                > > > -----Original Message-----
                                > > > From: Eric Bridger [mailto:eric@...]
                                > > > Sent: Saturday, 31 December 2005 7:00 a.m.
                                > > > To: dan.horne@...
                                > > > Cc: soaplite@yahoogroups.com
                                > > > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via
                                > WSDL
                                > > >
                                > > > Hmmm. This has been an educational thread, but back to the original
                                > > > post yesterday. The code below works as expected with no warnings
                                > about
                                > > > use_prefix.
                                > > >
                                > > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                                > > > > Running the standard web service example from the doco:
                                > > > >
                                > > > > #!/usr/local/bin/perl
                                > > > > use SOAP::Lite;
                                > > > > print SOAP::Lite
                                > > > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                                > > > > -> getQuote('MSFT');
                                > > > >
                                > > > > And the warnings return:
                                > > > >
                                > > > > use_prefix has been deprecated. if you wish to turn off or on the
                                > use
                                > > > of a
                                > > > > default namespace, then please use either ns(uri) or default_ns(uri)
                                > > > at
                                > > > > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                                > > > >
                                > > > > It's not clear to me how I use ns or default_ns in this instance.
                                > > > >
                                > > > > Regards
                                > > > >
                                > > > > Dan Horne
                                > >
                                >
                              • Dan Horne
                                ... Sorry, actually that s not true, but I can t test it .65_6. Dan
                                Message 15 of 15 , Dec 30, 2005
                                • 0 Attachment
                                  > .65_6 doesn't have this warning

                                  Sorry, actually that's not true, but I can't test it .65_6.

                                  Dan

                                  > -----Original Message-----
                                  > From: soaplite@yahoogroups.com [mailto:soaplite@yahoogroups.com] On Behalf
                                  > Of Dan Horne
                                  > Sent: Saturday, 31 December 2005 8:45 a.m.
                                  > To: 'Eric Bridger'
                                  > Cc: soaplite@yahoogroups.com
                                  > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via WSDL
                                  >
                                  > .65_6 doesn't have this warning
                                  >
                                  > > -----Original Message-----
                                  > > From: Eric Bridger [mailto:eric@...]
                                  > > Sent: Saturday, 31 December 2005 8:33 a.m.
                                  > > To: Dan Horne
                                  > > Cc: soaplite@yahoogroups.com
                                  > > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services via
                                  > WSDL
                                  > >
                                  > > Well I am still using version: .65_6
                                  > > use SOAP::Lite;
                                  > > print SOAP::Lite
                                  > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                                  > > -> getQuote('MSFT');
                                  > > print "\n";
                                  > >
                                  > > gives no warnings.
                                  > >
                                  > > On Fri, 2005-12-30 at 14:23, Dan Horne wrote:
                                  > > > Hi Eric
                                  > > >
                                  > > > Are you sure? I've just installed the new 0.66 version SOAP::Lite on
                                  > > three
                                  > > > different machines, and all exhibit the behaviour. From the uri
                                  > method:
                                  > > >
                                  > > > $self->register_ns($self->{'_ns_uri'}) if (!$self->use_prefix);
                                  > > >
                                  > > > and use_prefix has the warning.
                                  > > >
                                  > > > Dan
                                  > > >
                                  > > > > -----Original Message-----
                                  > > > > From: Eric Bridger [mailto:eric@...]
                                  > > > > Sent: Saturday, 31 December 2005 7:00 a.m.
                                  > > > > To: dan.horne@...
                                  > > > > Cc: soaplite@yahoogroups.com
                                  > > > > Subject: RE: [soaplite] v0.66: use_prefix deprecated and services
                                  > via
                                  > > WSDL
                                  > > > >
                                  > > > > Hmmm. This has been an educational thread, but back to the
                                  > original
                                  > > > > post yesterday. The code below works as expected with no warnings
                                  > > about
                                  > > > > use_prefix.
                                  > > > >
                                  > > > > On Thu, 2005-12-29 at 01:03, Dan Horne wrote:
                                  > > > > > Running the standard web service example from the doco:
                                  > > > > >
                                  > > > > > #!/usr/local/bin/perl
                                  > > > > > use SOAP::Lite;
                                  > > > > > print SOAP::Lite
                                  > > > > > -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
                                  > > > > > -> getQuote('MSFT');
                                  > > > > >
                                  > > > > > And the warnings return:
                                  > > > > >
                                  > > > > > use_prefix has been deprecated. if you wish to turn off or on the
                                  > > use
                                  > > > > of a
                                  > > > > > default namespace, then please use either ns(uri) or
                                  > default_ns(uri)
                                  > > > > at
                                  > > > > > /usr/local/lib/perl5/site_perl/5.8.7/SOAP/Lite.pm line 858.
                                  > > > > >
                                  > > > > > It's not clear to me how I use ns or default_ns in this instance.
                                  > > > > >
                                  > > > > > Regards
                                  > > > > >
                                  > > > > > Dan Horne
                                  > > >
                                  > >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  > Yahoo! Groups Links
                                  >
                                  >
                                  >
                                  >
                                  >
                                Your message has been successfully submitted and would be delivered to recipients shortly.