t: +44 (0)191 305 5035 e: info@unifiedsoftware.co.uk
- Home
- Products
- Developers
- Demo
- Free trial
- Site map
- About us
- Testimonials
- Contact us
1. PHP SOAP Client PEAR SOAP Example
2. PHP WSDL Client nuSOAP
3. PHP WSDL Client PEAR SOAP
1 PHP SOAP Client PEAR SOAP Example
This example access the service directly using its SOAP interface, i.e. without generating the proxy code from wsdl.
require_once 'SOAP/Client.php';
$client = new SOAP_Client
('https://www.unifiedsoftware.co.uk/cgi-bin/bankvalSOAP.cgi');
$paramstring = $userid . "|" . $PIN . "|" . $sortcode . "|"
. $account; $params = array('params'=> $paramstring);
$result = $client->
call('bankvalidate',$params, array('namespace'=>'urn:BankValSOAP'));
if (PEAR::isError($result))
print("Error: " . $result->getMessage() . "\n");
print_r ($result);
2 PHP WSDL Client nuSOAP
require '~inc/nusoap.php';
$userid = trim($_POST['userid']);
$PIN = trim($_POST['PIN']);
$sortcode = trim($_POST['sortcode']);
$account = trim($_POST['account']);
$result = NULL;
$client = new soapclient('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl', true);
$err = $client->getError();
if ($err)
{
echo 'Constructor error' . $err;
}
$paramstring = $userid . "|" . $PIN" . "|" . $sortcode . "|" . $account;
$params = array((string) $paramstring);
$result = $client->call('bankvalidate', $params);
$err = $client->getError();
if ($err)
{
echo 'Error' . $err;
}
print_r ($result);
3. PHP WSDL Client PEAR SOAP
$userid, $PIN, $sortcode and $account as appropriate.
require_once 'SOAP/Client.php';
$wsdl = new SOAP_WSDL("http://www.unifiedsoftware.co.uk/BankValukall2.wsdl");
$client = $wsdl->getProxy();
$params = $userid . "|" . $PIN . "|" . $sortcode . "|" . $account;
$result = $client->bankvalidate($params);
if (PEAR::isError($result))
print("Error: " . $result->getMessage() . "\n");
print_r ($result);