beautypg.com

TANDBERG Gatekeeper/Border Controller API D14172.01 User Manual

Page 18

background image

TANDBERG Gatekeeper/Border Controller API User Guide

D14172.01

page 18 of 84



Example 1.22


The example below performs the same task as Example 1.21 but uses GetConfiguration:

$client = new SoapClient('http://10.0.0.1/webservices.wsdl',
array('login' => '<username>', 'password' => '<password>'));

$result = $client->GetConfiguration( array('Location' => '/SNMP') );
echo $result->GetConfigurationResult->Configuration->SNMP->SystemContact;
?>



Example 1.23


The example below shows how to use SetConfigurationXML to modify the SNMP system contact
configuration:

$client = new SoapClient('http://10.0.0.1/webservices.wsdl',
array('login' => '<username>', 'password' => '<password>'));

$config_xml = '
Alice
';
$params = array( 'Document' => array('any' => $config_xml) );
$client->SetConfigurationXML( $params );

?>



Example 1.24


The example below shows performs the same task as Example 1.23 but uses SetConfiguration:

$client = new SoapClient('http://10.0.0.1/webservices.wsdl',
array('login' => '<username>', 'password' => '<password>'));

$params->Document->Configuration->SNMP->SystemContact = 'Alice';
$client->SetConfiguration( $params );
?>