Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] Denied access to method (...) in class (...)

Expand Messages
  • Duncan Cameron
    ... You appear to be mixing both STATIC and DYNAMIC deployment. See the Service Deployment section of the docs In your server do either .. use Demo; .. -
    Message 1 of 2 , Mar 21, 2003
    • 0 Attachment
      On 2003-03-21 na_jennings wrote:
      >I am hoping someone can help point out where I am going so wrong.
      >I have just started trying to use SOAP with SOAP::Lite and I was
      >trying something hopefully simplistic just to see what was happening
      >but I keep getting the same error.
      >
      >Denied access to method (hi) in class (Demo)
      >at /usr/local/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2128
      >
      >Based on the documentation and web examples I have a simple Soap
      >Server
      >
      >#!usr/bin/perl -w
      >
      >use SOAP::Transport::HTTP +trace => qw(debug trace);
      >use lib '/usr/local/production/soap';
      >
      >use Demo;
      >
      ># don't want to die on 'Broken pipe' or Ctrl-C
      >$SIG{PIPE} = $SIG{INT} = 'IGNORE';
      >
      >$daemon = SOAP::Transport::HTTP::Daemon
      > -> new (LocalPort => 9999)
      > -> dispatch_to('/usr/local/production/soap/')
      >;
      >
      >print "Contact to SOAP server at ", $daemon->url, "\n";
      >$daemon->handle;
      >
      >and a module Demo.pm in the /usr/local/production/soap/ directory
      >
      >package Demo;
      >require Exporter;
      >@ISA = qw(Exporter);
      >@EXPORT = qw(
      > hi bye
      > );
      >
      > sub hi {
      > return "hello, world";
      > }
      >
      > sub bye {
      > return "goodbye, cruel world";
      > }
      >
      >1;
      >
      >(I have tried it with and without the Exporter and it makes no
      >difference to the error I am getting)
      >
      >The client I am using is
      >
      >#!/usr/bin/perl
      >#
      >use SOAP::Lite +trace => qw(debug trace);
      >#use SOAP::Lite;
      >my $name = shift;
      >print "\n\nCalling the Soap Server to say hello\n\n";
      >print "The SOAP Server says: ";
      >print SOAP::Lite
      > -> uri('urn:Demo')
      > -> proxy('http://localhost:9999')
      > -> hi($name)
      > -> result . "\n\n";
      >
      >Any help will be appreciated
      >
      You appear to be mixing both STATIC and DYNAMIC deployment.
      See the Service Deployment section of the docs
      In your server do either

      ..
      use Demo;
      ..
      -> dispatch_to('Demo')

      or

      # no use Demo;
      ..
      -> dispatch_to('/usr/local/production/soap/')


      Regards,
      Duncan Cameron
    Your message has been successfully submitted and would be delivered to recipients shortly.