Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Can't access class methods via SOAP

by DamnDirtyApe (Curate)
on Aug 05, 2004 at 16:06 UTC ( #380308=note: print w/replies, xml ) Need Help??


in reply to Re: Can't access class methods via SOAP
in thread Can't access class methods via SOAP

Thanks gellyfish, but I'm still having some problems. Here's how call() is used in the SOAP::Lite docs:

# you should specify uri() my $soap = SOAP::Lite -> uri('http://my.own.site/CLASS') # <<< CLASS goes here # ..... other parameters ; my $obj = $soap->call(new => @parameters)->result; print $soap->call(method => $obj)->result; # $obj object will be updated here if necessary, # as if you call $obj->method() and method() updates $obj # Update of modified object MAY not work if server on another side # is not SOAP::Lite

And here's what I've done:

#! /usr/bin/perl -w use strict; use SOAP::Lite; my $soap = SOAP::Lite -> proxy( 'http://dg.homeunix.org/cgi-bin/soapserver.cgi' ) -> uri( 'http://dg.homeunix.org/Greeter' ) -> on_fault( sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, +"\n"; }); my $greeter = $soap->call( new => 'Doug' )->result; print $soap->call( formal => $greeter )->result; __END__

...and I get the same error as before.


_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re^3: Can't access class methods via SOAP
by gellyfish (Monsignor) on Aug 05, 2004 at 16:49 UTC

    I think you need to go back to basics - this works:

    Server: #! /usr/bin/perl use strict; use SOAP::Transport::HTTP; use lib '/var/www/cgi-bin/soap_modules'; + use Greeter; SOAP::Transport::HTTP::CGI -> dispatch_to( '/var/www/cgi-bin/soap_modules','Greeter') -> handle; Client: #! /usr/bin/perl -w use strict; + use SOAP::Lite +autodispatch => proxy => 'http://localhost/cgi-bin/soaptest.cgi', uri => 'http://localhost/Greeter' , on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, +"\n"; }; + my $greeter = Greeter->new('Doug'); print $greeter->formal();

    You will find that you get bitten like this when trying to do this kind of stuff.

    /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://380308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-06-02 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (19 votes). Check out past polls.

    Notices?