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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.