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

Re: [soaplite] problem with constructor

Expand Messages
  • Paul Kulchenko
    Hi, Jeremy! ... You need to allow access to new() method or all method in SendReceive class with dispatch_to method on server side:
    Message 1 of 2 , Nov 29, 2001
    • 0 Attachment
      Hi, Jeremy!

      > <faultstring xsi:type="xsd:string">Denied access to method (new) in
      You need to allow access to new() method or all method in SendReceive
      class with dispatch_to method on server side:

      ->dispatch_to('SendReceive'); # to give access to ANY method

      -- OR --

      ->dispatch_to('SendReceive::new'); # to give access to new() method

      You need to give access to ALL classes/methods that you plan to call
      remotely.

      SERVICE DEPLOYMENT and SECURITY sections from SOAP::Lite
      documentation may be helpful. Let me know if you still have problems.

      Best wishes, Paul.

      --- bcase@... wrote:
      > At 06:55 PM 11/28/2001 -0800, you wrote:
      >
      > hello all
      >
      > I have a soap server which dispatches a class called SendReceive. i
      >
      > get this error when i try to access the object constructor via
      > client.
      >
      > <faultstring xsi:type="xsd:string">Denied access to method (new) in
      >
      > class (SendReceive) at E:/productivity/perl/site/lib/SOAP/Lite.pm
      > line
      >
      >
      > Here is the class constructor for SendReceive on the soap server.
      > Is
      > there anything you see wrong with it, for using it with soap?
      >
      > sub new (){
      >
      > my $invocant = shift;
      > my $class = ref($invocant) || $invocant;
      > $self = {
      > Pop3Login => undef,
      > Pop3Pass => undef,
      > Pop3Host => "pop3",
      > Pop3Port => 110,
      > Pop3Auth => undef,
      > Pop3Debug => 0,
      > Pop3Timeout => 60,
      > SmtpHost => "smtp",
      > SmtpPort => 25,
      > SmtpTimeout => 10,
      > SenderIP => undef,
      > ReturnAddress => undef,
      > SenderAddress => undef,
      > @_,
      > };
      >
      > return bless $self, $class;
      >
      > }
      >
      >
      > thanks.
      > Your help is always appreciated
      >
      > Jeremy.
      >
      >
      > #####client code######
      >
      > my $soap = SOAP::Lite
      > ->uri( 'http://localhost/SendRecieve' )
      > ->proxy ('tcp://localhost:8080')
      > ->on_debug(sub { print @_ });
      >
      >
      >
      > my $Retrieve = $soap->SOAP::new(
      > Pop3Login => $login,
      > Pop3Pass => $pass,
      > Pop3Host => $smtphost
      > )->result();
      >
      > $Retrieve->pop3Connect();
      >
      > #Can't call method "pop3Connect" on an undefined value
      >
      > I know this should work!
      >
      >
      >
      >
      > 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/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
      http://geocities.yahoo.com/ps/info1
    Your message has been successfully submitted and would be delivered to recipients shortly.