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:
<?php
$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:
<?php
$client = new SoapClient('http://10.0.0.1/webservices.wsdl',
array('login' => '<username>', 'password' => '<password>'));
$config_xml = '<Configuration xmlns="http://www.tandberg.no/XML/CUIL/1.0">
<SNMP><SystemContact>Alice</SystemContact></SNMP></Configuration>';
$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:
<?php
$client = new SoapClient('http://10.0.0.1/webservices.wsdl',
array('login' => '<username>', 'password' => '<password>'));
$params->Document->Configuration->SNMP->SystemContact = 'Alice';
$client->SetConfiguration( $params );
?>