TANDBERG D14172.01 manual Example, page 17 of

Models: D14172.01

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

TANDBERG Gatekeeper/Border Controller API User Guide

The SOAP interface has a number of operations for dealing with Status and Configuration:

GetXML

Returns status or configuration information for a specified XPath expression. The returned value is an XML document.

GetConfiguration

Returns configuration information for a specified XPath expression. The returned value is a strongly typed SOAP value as defined in the WSDL document.

GetConfigurationXML

Returns configuration information for a specified XPath expression. The returned value is an XML document.

SetConfiguration

Sets configuration. The configuration parameter is passed as an XML document.

SetConfigurationXML

Sets configuration. The configuration parameter is passed as strongly typed SOAP parameters as defined in the WSDL document.

Example 1.20

The example below shows how to use GetXML to retrieve information about the system unit from the status document and extract the up time:

<?php

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

$result = $client->GetXML( array('Location' => '/Status/SystemUnit') ); $xml_result = SimpleXMLElement( $result->GetXMLResult->any );

echo $xml_result->SystemUnit->Uptime; ?>

Example 1.21

The example below shows how to use GetConfigurationXML to retrieve information about the SNMP configuration and extract the system contact:

<?php

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

$result = $client->GetConfigurationXML( array('Location' => '/SNMP') ); $xml_result = new SimpleXMLElement(

$result->GetConfigurationXMLResult->any ); echo $xml_result->SNMP->SystemContact;

?>

D14172.01

page 17 of 84

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