PHP Example #2: Import XML

PHP

<?php
        			
$soapClient = new SoapClient("http://nsidev:8080/NLSWebService/Service.asmx?WSDL", array(
	"login"      => "nls.local\\user",
	"password"   => "password",
	"trace"      => 1,
	"exceptions" => 0));
        			
// Call RemoteFunction ()
$error = 0;
try {
	// Setup the RemoteFunction parameters
	$ap_param = array(
		'ServerName'       =>    ' NlsSql08',
		'DatabaseName'     =>    'Database_Name',
		'ImportString'     =>    'xxxxxxxxxx'
                                 );
	$info = $soapClient->__call("ImportXML ", array($ap_param));
			
	print "<pre>\n";
//    print "Request: \n".htmlspecialchars($soapClient->__getLastRequest()) ."\n";
	print "Response: \n".htmlspecialchars($soapClient->__getLastResponse())."\n";
	print "</pre>";
        			
} catch (SoapFault $fault) {
        $error = 1;
}
			
?>