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

Denied access to method (mod_perl+SOAP::Lite)

Expand Messages
  • Sheth, Niraj
    Hi, I am getting Denied access to method error message. httpd.conf ... PerlRequire /Volumes/app/dev/codebase/perl/start_up.pl PerlModule Apache::Reload
    Message 1 of 3 , Sep 28 6:18 AM
    • 0 Attachment
      Hi,

      I am getting "Denied access to method" error message.

      httpd.conf
      =======
      -----------------><----------------

      PerlRequire /Volumes/app/dev/codebase/perl/start_up.pl

      PerlModule Apache::Reload
      <Location /soap>
      # PerlInitHandler Apache::Reload
      # PerlSetVar ReloadDebug On
      # PerlSetVar ReloadAll Off
      SetHandler perl-script
      PerlHandler SOAP::Apache
      </Location>
      -----------------><----------------

      SOAP::Apache
      ===========
      package SOAP::Apache;

      use strict;
      use SOAP::Transport::HTTP;

      #SOAP::Lite->soapversion(1.2);
      my $server = SOAP::Transport::HTTP::Apache
      -> serializer(MySerializer->new)
      -> dispatch_to('/Volumes/app/dev/codebase/perl/modules');

      $server->serializer->xmlschema(2001);
      print "SOAP xml schema: " . $server->serializer->xmlschema . "\n";

      sub handler { $server->handler(@_) }

      BEGIN {
      package MySerializer; @MySerializer::ISA = 'SOAP::Serializer';

      sub envelope {
      print STDERR "($$) $ENV{REMOTE_USER}: envelope called with $_[1],
      $_[2] at " . localtime() . "\n";
      UNIVERSAL::isa($_[2] => 'SOAP::Data')
      ? do { (my $method = $_[2]->name) =~ s/Request$/Response/;
      $_[2]->name($method) }
      : $_[2] =~ s/Request$/Response/
      if $_[1] =~ /^(?:method|response)$/;

      $_[2] = SOAP::Data->name($_[2])
      ->encodingStyle("http://schemas.xmlsoap.org/soap/encoding/")
      if $_[1] =~ /^(?:method|response)$/;

      shift->SUPER::envelope(@_);
      }
      }

      1;

      -----------------><----------------

      In dir /Volumes/app/dev/codebase/perl/modules I have A.pm, B.pm, C.pm etc ..
      and B and C has "use A;" while A.pm has "use B;" and "use C;" (@INC and "use
      lib" are set in start_up.pl)


      Now it works for few times first but will fail after that with Denied access
      to method error.
      Any Idea?? Does anyone has experience similiar problem?

      First I thought it's Apache::Reload, but I commented out from httpd.conf
      (still I have "use Apache::Reload;" in all modules though).

      Thanks,
      -Niraj

      My set-up is
      mod_perl(latest 1.2x)
      perl 5.6.1
      SOAP::Lite(latest)
      Solaris 2.8



      LEGAL NOTICE
      Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
    • Sheth, Niraj
      After little bit more reading thru mailing list.. I got it working with following line .. dispatch_to( /Volumes/app/dev/codebase/perl/modules , [ w:]+ ); but
      Message 2 of 3 , Sep 28 10:10 AM
      • 0 Attachment
        After little bit more reading thru mailing list.. I got it working with
        following line ..

        dispatch_to('/Volumes/app/dev/codebase/perl/modules', '[\w:]+');

        but not as ..
        http://guide.soaplite.com/#service dispatch (different services on one
        server)

        dispatch_to('/Volumes/app/dev/codebase/perl/modules', 'Demo');

        Anyway got working...

        -Niraj

        -----Original Message-----
        From: Sheth, Niraj
        Sent: Saturday, September 28, 2002 9:18 AM
        To: soaplite@yahoogroups.com
        Subject: [soaplite] Denied access to method (mod_perl+SOAP::Lite)


        Hi,

        I am getting "Denied access to method" error message.

        httpd.conf
        =======
        -----------------><----------------

        PerlRequire /Volumes/app/dev/codebase/perl/start_up.pl

        PerlModule Apache::Reload
        <Location /soap>
        # PerlInitHandler Apache::Reload
        # PerlSetVar ReloadDebug On
        # PerlSetVar ReloadAll Off
        SetHandler perl-script
        PerlHandler SOAP::Apache
        </Location>
        -----------------><----------------

        SOAP::Apache
        ===========
        package SOAP::Apache;

        use strict;
        use SOAP::Transport::HTTP;

        #SOAP::Lite->soapversion(1.2);
        my $server = SOAP::Transport::HTTP::Apache
        -> serializer(MySerializer->new)
        -> dispatch_to('/Volumes/app/dev/codebase/perl/modules');

        $server->serializer->xmlschema(2001);
        print "SOAP xml schema: " . $server->serializer->xmlschema . "\n";

        sub handler { $server->handler(@_) }

        BEGIN {
        package MySerializer; @MySerializer::ISA = 'SOAP::Serializer';

        sub envelope {
        print STDERR "($$) $ENV{REMOTE_USER}: envelope called with $_[1],
        $_[2] at " . localtime() . "\n";
        UNIVERSAL::isa($_[2] => 'SOAP::Data')
        ? do { (my $method = $_[2]->name) =~ s/Request$/Response/;
        $_[2]->name($method) }
        : $_[2] =~ s/Request$/Response/
        if $_[1] =~ /^(?:method|response)$/;

        $_[2] = SOAP::Data->name($_[2])
        ->encodingStyle("http://schemas.xmlsoap.org/soap/encoding/")
        if $_[1] =~ /^(?:method|response)$/;

        shift->SUPER::envelope(@_);
        }
        }

        1;

        -----------------><----------------

        In dir /Volumes/app/dev/codebase/perl/modules I have A.pm, B.pm, C.pm etc ..
        and B and C has "use A;" while A.pm has "use B;" and "use C;" (@INC and "use
        lib" are set in start_up.pl)


        Now it works for few times first but will fail after that with Denied access
        to method error.
        Any Idea?? Does anyone has experience similiar problem?

        First I thought it's Apache::Reload, but I commented out from httpd.conf
        (still I have "use Apache::Reload;" in all modules though).

        Thanks,
        -Niraj

        My set-up is
        mod_perl(latest 1.2x)
        perl 5.6.1
        SOAP::Lite(latest)
        Solaris 2.8



        LEGAL NOTICE
        Unless expressly stated otherwise, this message is confidential and may be
        privileged. It is intended for the addressee(s) only. Access to this E-mail
        by anyone else is unauthorized. If you are not an addressee, any disclosure
        or copying of the contents of this E-mail or any action taken (or not taken)
        in reliance on it is unauthorized and may be unlawful. If you are not an
        addressee, please inform the sender immediately.


        To unsubscribe from this group, send an email to:
        soaplite-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • Paul Kulchenko
        Hi Niraj, ... This is not secure. Check SERVICE DEPLOYMENT. STATIC AND DYNAMIC and SECURITY sections in SOAP::Lite doc:
        Message 3 of 3 , Sep 28 2:19 PM
        • 0 Attachment
          Hi Niraj,

          --- "Sheth, Niraj " <niraj_sheth@...> wrote:
          > After little bit more reading thru mailing list.. I got it working
          > with following line ..
          >
          > dispatch_to('/Volumes/app/dev/codebase/perl/modules', '[\w:]+');
          This is not secure. Check SERVICE DEPLOYMENT. STATIC AND DYNAMIC and
          SECURITY sections in SOAP::Lite doc:
          http://theoryx5.uwinnipeg.ca/CPAN/data/SOAP-Lite/SOAP/Lite.html

          > but not as ..
          > http://guide.soaplite.com/#service dispatch (different services on
          > one server)
          >
          > dispatch_to('/Volumes/app/dev/codebase/perl/modules', 'Demo');
          In your case it probably should be

          dispatch_to('/Volumes/app/dev/codebase/perl/modules', 'A', 'B', 'C');

          Best wishes, Paul.

          __________________________________________________
          Do you Yahoo!?
          New DSL Internet Access from SBC & Yahoo!
          http://sbc.yahoo.com
        Your message has been successfully submitted and would be delivered to recipients shortly.