although NuSOAP is a very common PHP SOAP library, it's main use in PHP4 applications I think. because PHP5 has a built-in SOAP extension that is faster (because it is a compiled extension). I also recommend using Zend Framework SOAP library. but I remember I wanted to use some web service (not written by me, implemented in Java) and none of these SOAP clients worked, but the NuSOAP. and I really could not figure out why.
anyway, here is the thing that I did to use that web service back then:
$soapClient = new nusoap_client($wsdlFile, 'wsdl', '', '', '', '');
$soapClient->soap_defencoding = 'UTF-8';
$soapClient->debug_flag = false;
$soapError = $soapClient->getError();
if (! empty($soapError)) {
$errorMessage = 'Nusoap object creation failed: ' . $soapError;
throw new Exception($errorMessage);
}
// calling verifyT method, using 2 parameters.
$tResult = $soapClient->call( 'verifyT', array($param1, $param2) );
$soapError = $soapClient->getError();
if (! empty($soapError)) {
$errorMessage = 'SOAP method invocation (verifyT) failed: ' . $soapError;
throw new Exception($errorMessage);
}
if ($soapClient->fault) {
$fault = "{$soapClient->faultcode}: {$soapClient->faultdetail} ";
// handle fault situation
}