TANDBERG D14172.01 manual Example, page 18 of

Models: D14172.01

1 84
Download 84 pages 8.98 Kb
Page 18
Image 18
page 18 of 84

TANDBERG Gatekeeper/Border Controller API User Guide

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 );

?>

D14172.01

page 18 of 84

Page 18
Image 18
TANDBERG D14172.01 manual Example, page 18 of