my journeys into soap have been quite sucessful lately, until I ran into this wall..
the soap service:
use strict;
use SOAP::Transport::HTTP;
my $daemon = SOAP::Transport::HTTP::Daemon->new
(LocalAdd => 'localhost', LocalPort => 8082);
$daemon->dispatch_to("BenderRemote")->handle;
package BenderRemote;
sub ping
{
print "ping called\n";
return scalar(localtime());
}
sub new {
my ($pkg) = @_;
print "new!\n";
my $self = {};
return bless $self, $pkg;
}
sub loadData {
my ($self) = @_;
print "loaddata!\n";
$self->{data} = "fobars";
return 1;
}
and my client script:
use strict;
use Data::Dumper;
use SOAP::Lite;
my $soap = SOAP::Lite
->uri("http://host/BenderRemote")
->proxy("http://host:8082");
my $br = $soap->call("new")->result();
$br->loadData();
print Dumper $br;
It seem to be having trouble running the second method, which I'm not starting via call()..
any input?
-ryan
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|