Project

General

Profile

Bug #7282

Create course Webservice failure

Added by Borja José Celda González almost 5 years ago. Updated almost 5 years ago.

Status:
Rejected - Abandoned
Priority:
Normal
Assignee:
-
Category:
Web services
Target version:
Start date:
23/09/2014
Due date:
% Done:

0%

Estimated time:
2.00 h
Complexity:
Normal
SCRUM pts - complexity:
?

Description

PHP: 5.5
Chamilo: 1.9.8.2
Server: Nginx
OS: Ubuntu Server 14.04 AMD64

Hello to every one, when i'm triying to call the SOAP webservice to create a new course, the system throws a "undefined function" exception.

I'm using this code to call it

$data = array('secret_key' => sha1("79.108.247.76".bbbPassword), 'title' => $course->title, 'category_code' => $course->category_code, 'wanted_code' => $course->code, 'tutor_name' => Yii::$app->user->identity->firstname, 'course_admin_user_id_field_name' => "chamilo_user_id", 'course_admin_user_id_value' => Yii::$app->user->identity->id, 'language' => $course->course_language);
        //Importamos las librerías de NuSOAP 
        require_once Yii::getAlias("@vendor") . '/nusoap/lib/nusoap.php';
        //Inicializamos el cliente de nusoap
        $client = new \nusoap_client('http://lms.scirenetwork.com/main/webservices/soap.php');
        if ($client->getError()) {
            die("Error al inicializar el objeto SOAP: " . $client->getError());
        }
        //realizar una llamada al api
        $awnser = $client->call("WSCourse.CreateCourse", $data);
        var_dump($client);
        var_dump($awnser);
        var_dump($client->getError());

And if you do the "$client" var_dump you will get the request even if it failed, and the request is like this (i send you a screenshot):

Fatal error: Call to undefined method WSCourse::create_course() in /var/www/clients/client6/web33/web/main/webservices/webservice_course.php on line 115
" ["responseData"]=> string(188) " 

When i'm going to see the origin of the problem i go to the webservice_course.php in /main/webservices/webservice_course.php

Line: 115 ->   $result = $this->create_course($wanted_code, $title, $tutor_name, $category_code, $language, $course_admin_id, $this->_configuration['db_prefix'], 0);

There's no "create_course" function, so the webservice can't work


Files

History

#1

Updated by Yannick Warnier almost 5 years ago

  • Status changed from New to Needs more info

Hola Borja,

No hemos mantenido webservice_course.php en mucho tiempo. Mejor usa registration.soap.php que tiene una función de creación de cursos que, según sabemos, funciona bien.

Cerraremos esta tarea dentro de 7 días si es que no hay actualización.

#2

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Needs more info to Rejected - Abandoned

Also available in: Atom PDF