0
calling soap method from laravel to chamilo registration.soap.php for creating user but geeting error as
"http://example.com/main/webservices/registration.soap.php?wsdl' : Extra content at the end of the document..
// passing array in soap
    $params =  array (
                        'username' => 'admin',//$userdata->username,
                        'secret_key' => $ChamiloSecreteKey, 
                    );  


        $chamilo_account = (new self)->chamilo_soap_call('registration', 'WSGetUserFromUsername', $params);


    public function chamilo_soap_call(){

    $params = func_get_args();
    $service = array_shift($params);
    $action = array_shift($params);

    ini_set('soap.wsdl_cache_enabled', 0);

     $service_path = (new self)->chamilo_get_service_path($service);

         if ($service_path) {
            $client = new SoapClient($service_path);    
            // Make call and its return result
            return $client->__soapCall($action, $params);
          } else {
            return FALSE;
          }

    }


    public function chamilo_get_service_path($service) {
      static $services;

      $chamilo_server   = Config::get('app.careerxi.subdomain.learning');
      $chamilo_baseurl   = Config::get('app.careerxi.chamilo.base_url');

      //$chamilo_server = variable_get('chamilo_server', '');
      if (!isset($services)) {
        $services = array('courses_list', 'user_info', 'registration');
      }
    and using this function crating path which is in chamilo 

但收到错误为“SOAP-ERROR:解析 WSDL:无法从”“文档末尾的额外内容”加载当前我正在使用 php 7 .. 是否需要降级或其他任何东西来解决这个问题?

4

1 回答 1

0

发现 chamilo 服务器在解决其工作后有一些警告

于 2020-02-29T11:20:07.777 回答