Re: Perl xmlrpc server problem.
Aleksandar Janicijevic <[email protected]>
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
Instead of push(sig,"a"); it should be push(@sig,"a"); The easiest way to spot this kind of problem in Perl is to always set the script so Perl will issue warnings - your shebang line should be: #!/usr/bin/perl -w Regards, Aleksandar Janicijevic P.S. I don't guarantee that your program will work after that, but at least Perl doesn't choke on it. --- Jim <[email protected]> wrote: > I'm getting an error I don't quite understand with > my first attempt at a > xmlrpc server. First let me explain I have no idea > what I'm doing. I > haven't figured out what some of these things do. > > Here;s the error: > Can't locate object method "is_valid" via package > "RPC::XML::Method::new: Missing required data" > (perhaps you forgot to > load "RPC::XML::Method::new: Missing required > data"?) at > /usr/share/perl5/RPC/XML/Server.pm line 363. > > And here's the code. > > require RPC::XML::Server; > > $srv = RPC::XML::Server->new(port => 9000); > # Several of these, most likely: > my @sig; > push(sig,"a"); > my %meth; > $meth{name}="test"; > $meth{version}="0.1"; > $meth{hidden}="0"; > $meth{code}=\&submeth; > $meth{signature}=\@sig; > > $srv->add_method(\%meth); > > $srv->server_loop; # Never returns > > For testing I don't have anything in the function > submeth, it's an empty > body. > > Thanks for any help. If this is the wrong place to > ask or if there is a > better place to ask, please let me know. > > Jim. > > > > > > > Yahoo! Groups Links > > > [email protected] > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/xml-rpc/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/