How to catch an exception using SoapClient.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was wondering how I'd catch an exception using SoapClient.



$data = array(
'Particular'=>'Payment for stuff',
 'Email' =>'e <philip@xxxxxxxxxxxxx>mail address',
 'CardNumber'=>'0000000000000000,
'CardType' =>'MC',
 'CardExpiry'=>'0423',
'CardHolderName'=>'James Newman',
 'CardCSC' =>'111',
'StoreCard' =>'true'
 );
 $vars = array(
 'trace' => 1,
'exceptions' => true,
        'cache_wsdl' => WSDL_CACHE_NONE,
        'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
 $client = new SoapClient("http://XMLSERVICEURLws/paymentws.asmx?WSDL";,
$vars);

#$out = $client->ListCards($text);
 #$this->_result = $client->ProcessPurchase($data);
$this->_result = $client->ProcessAuthorise($data);
 #var_dump($client->__getLastRequestHeaders());
#var_dump($client->__getTypes());
 print_r($this->_result);

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux