调试php的soapCient

try {

            import('@.Ext.xml');

            header("Content-Type:text/html; charset=utf-8");

            $soap = new SoapClient('http://localhost/index.php/Api/index?wsdl');

            $usr = $_POST['usr'];

            $psw = $_POST['psw'];

            $ret = $soap->userLogin($usr, $psw);

            dump(xml_unserialize($ret));

        } catch (SoapFault $e) {

            echo '__getLastRequest<br/>';

            echo $soap->__getLastRequest();

            echo '__getLastResponse<br/>';

            echo $soap->__getLastResponse();

            echo 'getMessage<br/>';

            echo $e->getMessage();

        }

 

你可能感兴趣的:(SOAP)