Ispman.soap.server

From ISPMan

ispman.soap.server simply starts a server that listens to port 9999 or any other port that you pass as the first argument.

This is the simplest incarnation of the soap server (thanks to SOAP Lite).

The methods are defined in ISPManSoapServer package. This package can be found in lib/ISPMan/SOAP. This is basically maps any function call to lib/ISPMan/SAOP/ISPManSoapServer directory.

For example if you call

use SOAP::Lite;
my $soap= SOAP::Lite
   -> uri('http://localhost:9999/ISPManSoapServer')
   -> proxy('http://localhost:9999/ISPManSoapServer');
$soap->sayHello(" to me ");

then a file called lib/ISPMan/SOAP/ISPManSoapServer/sayHello_soap.pl will be executed and the result of the sayHello_soap function will be returned.

Simple.. these function_soap.pl files have access to the $ispman object.

For example see showDomains_soap.pl

sub showDomains_soap {
   my $type = shift;
   $filters = {
       'primary' => 'ispmanDomainType=primary',
       'slave'   => 'ispmanDomainType=slave',
       'nodns'   => 'ispmanDomainType=nodns',
       'replica' => 'ispmanDomainType=replica'
   };
   my $domains =
     $ispman->makeDomainHash( $ispman->getDomains( $filters->{$type} ) );
       my $_text="";
   for ( keys %$domains ) {
       $_text.="$_\n";
   }
       return $_text;
}

Now if you want to see all domains, use the test client.

ispman.soap.test.client showDomains

If you want to see only the primary domains,

ispman.soap.test.client showDomains primary
Toolbox
Support The Bounties: