# server.cgi use My::SOAP::Server::Foo::FooSoap; my $server = My::SOAP::Server::Foo::FooSoap->new({ dispatch_to => 'main', transport_class => 'SOAP::WSDL::Server::CGI', # optional, default }); $server->handle(); sub register_user { my ($self, $body, $header) = @_; if ( not $foo ) { #throw exception here } return Educativa::SOAP::Elements::registrar_usuario_response->new({ usuario => 'Ok' #string }); }