PHP

You are here home > know-how > php > SOAP > SOAP Error Handling

6.3 SOAP Error Handling

Date: 09.09.2006

6.2 Get Weather information with SOAP and WSDL [  up  ] - [ top ] - [ A - Z ] 7 Helper Code

SOAP Client with Error Handling


<?php
        require_once 'SOAP/Client.php';
        require_once 'soap-client-class.php';

        $service = new StationInfo();

        $id = 1000;
        $first = 'Hans';
        $last = 'Muster';

        $result = $service->doFuncFoo($id, $first, $last);

        if (PEAR::isError($result)) {
                $fault = $result->getFault();
                echo $fault->{'faultstring'};
        }
        else {
                var_dump($result);
        }
?>

Google
infoCopter   Web  

copyright by reto - created with mytexi