beautypg.com

TANDBERG Gatekeeper/Border Controller API D14172.01 User Manual

Page 17

background image

TANDBERG Gatekeeper/Border Controller API User Guide

D14172.01

page 17 of 84

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:

$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:

$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;
?>