如何通过API

时间:2017-09-07 15:17:35

标签: php soap five9

我是Five9的新手我在GitHub(https://github.com/kielerrr/Five9)中获得了一些示例代码,我通过代码并将凭据传递给API,但是我收到以下错误

"致命错误:未捕获的错误:Class' SoapClient'在C:\ xampp \ htdocs \ Five9-master \ includes \ Five9.php中找不到:20堆栈跟踪:#0 C:\ xampp \ htdocs \ Five9-master \ contacts \ getContactRecords.php(12):f9-> __construct()#1 {main}抛出C:\ xampp \ htdocs \ Five9-master \ includes \ Five9.php on line 20"

   $wsdl_five9 = "https://api.five9.com/wsadmin/v4/AdminWebService?wsdl&user=User_ID";
   //$wsdl_five9 = "https://api.five9.com/wsadmin/v4/AdminWebService?wsdl";
   try {
        $soap_options = array('login' => 'uer_name', 'password' => 'mypassword', 'trace' => true);
        $this->_connection = new SoapClient($wsdl_five9, $soap_options);//20th line 
    } catch (Exception $e) {
        $error_message = $e->getMessage();
        echo $error_message."ERROR";
        exit;
    }

请帮我详细说明......

1 个答案:

答案 0 :(得分:0)

以上代码可以很好地在您的系统中启用soap。 找到你的php.ini文件和取消注释(在soap扩展前删除分号),如下所示。 改变自: &#34 ;;延长= php_soap.dl" 至 : "延长= php_soap.dll"