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

denied access to method error

Expand Messages
  • skyeybubble
    Hi, I m new to SOAP::Lite and I m trying to play with the http daemon example I learned from the Quick Start Guide, but I get a denied access to method error.
    Message 1 of 1 , Nov 29, 2004
    • 0 Attachment
      Hi,

      I'm new to SOAP::Lite and I'm trying to play with the http daemon
      example I learned from the Quick Start Guide, but I get a denied
      access to method error. Could someone help me out? Thanks! The scripts
      and messages are listed here:

      daemon.pl
      -----------------------
      #!perl -w

      use SOAP::Transport::HTTP;

      use lib "/root/soaplite/modules";
      use Demo;

      # don't want to die on 'Broken pipe' or Ctrl-C
      $SIG{PIPE} = $SIG{INT} = 'IGNORE';

      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 80)
      -> dispatch_to('/root/soaplite/modules')
      ;

      print "Contact to SOAP server at ", $daemon->url, "\n";
      $daemon->handle;
      -----------------------

      hibye.pl
      -----------------------
      #!perl -w

      use SOAP::Lite;

      print SOAP::Lite
      -> uri('http://localhost.localdomain/Demo')
      -> proxy('http://localhost.localdomain')
      -> on_debug(sub{print@_})
      -> hi()
      -> result;
      -----------------------

      messages
      -----------------------
      POST http://localhost.localdomain HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 455
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://localhost.localdomain/Demo#hi"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:hi
      xmlns:namesp1="http://localhost.localdomain/Demo"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
      HTTP/1.1 500 Internal Server Error
      Date: Mon, 29 Nov 2004 12:58:10 GMT
      Server: libwww-perl-daemon/1.25
      Content-Length: 647
      Content-Type: text/xml; charset=utf-8
      Client-Date: Mon, 29 Nov 2004 12:58:10 GMT
      Client-Response-Num: 1
      SOAPServer: SOAP::Lite/Perl/0.60

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Denied
      access to method (hi) in class (Demo) at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2267.
      </faultstring><faultactor>http://localhost.localdomain/</faultactor></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Your message has been successfully submitted and would be delivered to recipients shortly.