package SOAPHello; use strict; use base 'My::SOAP'; use Hello; # So we can use SOAP::Fault to generate error # messages for the client. use SOAP::Lite; # Make it so only users in the 'hello' group can access # this module. # sub ACL_GROUP { 'hello' } my $hi; sub new { my $class = shift; my $self = { }; my $self->{user} = shift || undef; my $self->{passwd} = shift || undef; $hi = Hello->new($self); bless $self, $class; my $self->_authen; if($auth == 0) { die SOAP::Fault ->faultcode('Server.BadAuthData') ->faultstring('The supplied username or password was incorrect'); } elsif($auth <= 0) { die SOAP::Fault ->faultcode('Server.NoAccess') ->faultstring('You do not have access to this SOAP object'); } return $self; } sub hello { return $hi->hello; } 1;