- SOAP interface for PHP
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@165 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
e1b3542a2a
commit
d4f8dedfca
5 changed files with 107 additions and 3 deletions
48
php/SOAPRequester.php
Normal file
48
php/SOAPRequester.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/**
|
||||
* SOAP client class for accessing the gnuviech adminstration tool SOAP
|
||||
* service.
|
||||
* @author Jan Dittberner <jan@dittberner.info>
|
||||
* @version $Id$
|
||||
*/
|
||||
require_once('SOAP/Client.php');
|
||||
|
||||
/**
|
||||
* SOAP requester.
|
||||
*/
|
||||
class SOAPRequester {
|
||||
/**
|
||||
* SOAP_Client-Instanz.
|
||||
* @access private
|
||||
*/
|
||||
var $soapclient;
|
||||
|
||||
/**
|
||||
* Constructor expecting a settings array.
|
||||
* @param settings with options protocol, hostname, portnumber, path
|
||||
* @access public
|
||||
*/
|
||||
function SOAPRequester($settings) {
|
||||
$this->soapclient = new SOAP_Client(sprintf("%s://%s:%d/%s",
|
||||
$settings['protocol'],
|
||||
$settings['hostname'],
|
||||
$settings['portnumber'],
|
||||
$settings['path']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the echo method at the remote SOAP server.
|
||||
* @param String parameter
|
||||
* @return twice the String if the remote call is successful
|
||||
*/
|
||||
function callecho($param) {
|
||||
$options = array('trace' => 1);
|
||||
|
||||
$ret = $this->soapclient->call('echo',
|
||||
$params = array('param0' => $param),
|
||||
$options);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue