<?php
// Creating SOAP client for the LinkServer running on localhost
$client = new SoapClient("https://localhost:8443/ws/?wsdl");
$username = "admin";
$password = "admin";
$context = "users.admin";
$variable = "childInfo";
try
{
// Calling getXML Web Service function and decoding its output by URL decoder
$userInfoXML = urldecode($client->getXML($username, $password, $context, $variable));
}
catch (SoapFault $fault)
{
echo "Error occurred while calling remote function: ".$fault->faultcode." (".$fault->faultstring.")";
exit();
}
if (is_soap_fault($userInfoXML))
{
echo "Error occurred while calling remote function: ".$fault->faultcode." (".$fault->faultstring.")";
exit();
}
// Creating DOM document from XML
$xml = new DomDocument;
$xml->loadXML( $userInfoXML );
// Loading XSLT transformation
$xsl = new DomDocument;
$xsl->load( 'resources/xslt/dataTable.xslt' );
// Creating XSLT processor
$proc = new xsltprocessor;
$proc->importStyleSheet( $xsl );
// Processing out XML document and and showing the output
echo $proc->transformToXML( $xml );
?>
|