#94 with 0.66: uri deprecated, but still used by generate_stub

closed-out-of-date
nobody
Misc/Other (17)
5
2007-10-04
2006-01-04
Anonymous
No

Hi,

When invoking methods on a soap service loaded via
WSDL, my code has started producing warnings:

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/perl/share/perl/5.8.7//SOAP/Lite.pm line 858.

(url and authentication stuff removed)

my $soaper = SOAP::Lite->new();

ok(URL,"got url " . URL );

my $ua = $soaper->schema->useragent();
$ua->credentials(BASEURL,REALM,USER,PWD);

my $service =
$soaper->service(URL,"WsHelloService","WsHello");

ok($service,"got service");

my $hello = $service->getMessage;
ok($hello, "hello => $hello");

outputs:

mark:~/work/justice/modules/GE-Justice-Authz$ perl
t/soaphello.t
ok 1 - got url
https://maskedhostname:25471/wstest/services/WsHello?wsdl
ok 2 - got service
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/perl/share/perl/5.8.7//SOAP/Lite.pm line 858.
ok 3 - hello => Hello from webservice
cn=CLEMENTSM,ou=TestDTD,o=Usr

patch:

--- /home/perl/share/perl/5.8.7/SOAP/Lite.pm.dist
2006-01-04 12:03:29.000000000 +0100
+++ /home/perl/share/perl/5.8.7/SOAP/Lite.pm
2006-01-04 12:03:36.000000000 +0100
@@ -3005,7 +3005,7 @@
}
}
$self->endpoint($method{endpoint})
- ->uri($method{uri})
+ ->ns($method{uri})
->on_action(sub{qq!"$method{soapaction}"!});
EOP
my $namespaces = $self->deserializer->ids->[1];

The patch prevents the warning, but there may be some
potential issue I have missed.

Also, uri() is still referred to in example code in the
docs.

regards,

Mark

markdclements@yahoo.co.uk

Discussion

  • Logged In: NO

    The easiest way around this is to edit
    /usr/local/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm, and
    comment out line 858. Works like a charm.

     
  • Martin Kutter
    Martin Kutter
    2007-10-04

    Logged In: YES
    user_id=884175
    Originator: NO

    The URL given points at some user forum, not at a patch (or a message with a patch).

    From the Code in CVS, it looks like this has already been fixed.

     
  • Martin Kutter
    Martin Kutter
    2007-10-04

    • assigned_to: byrnereese --> nobody
    • status: open --> closed-out-of-date