123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <?php
- /* For licensing terms, see /license.txt */
- /**
- * Configures the WSUser SOAP service.
- *
- * @package chamilo.webservices
- */
- require_once __DIR__.'/webservice_user.php';
- require_once __DIR__.'/soap.php';
- /**
- * Configures the WSUser SOAP service.
- *
- * @package chamilo.webservices
- */
- $s = WSSoapServer::singleton();
- $s->wsdl->addComplexType(
- 'user_id',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'user_id_field_name' => [
- 'name' => 'user_id_field_name',
- 'type' => 'xsd:string',
- ],
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_result',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- 'result' => ['name' => 'result', 'type' => 'tns:result'],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_result_array',
- 'complexType',
- 'array',
- '',
- 'SOAP-ENC:Array',
- [],
- [
- [
- 'ref' => 'SOAP-ENC:arrayType',
- 'wsdl:arrayType' => 'tns:user_result[]',
- ],
- ],
- 'tns:user_result'
- );
- $s->register(
- 'WSUser.DisableUser',
- [
- 'secret_key' => 'xsd:string',
- 'user_id_field_name' => 'xsd:string',
- 'user_id_value' => 'xsd:string',
- ]
- );
- $s->register(
- 'WSUser.DisableUsers',
- ['secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'],
- ['return' => 'tns:user_result_array']
- );
- $s->register(
- 'WSUser.EnableUser',
- [
- 'secret_key' => 'xsd:string',
- 'user_id_field_name' => 'xsd:string',
- 'user_id_value' => 'xsd:string',
- ]
- );
- $s->register(
- 'WSUser.EnableUsers',
- ['secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'],
- ['return' => 'tns:user_result_array']
- );
- $s->register(
- 'WSUser.DeleteUser',
- [
- 'secret_key' => 'xsd:string',
- 'user_id_field_name' => 'xsd:string',
- 'user_id_value' => 'xsd:string',
- ]
- );
- $s->register(
- 'WSUser.DeleteUsers',
- ['secret_key' => 'xsd:string', 'users' => 'tns:user_id[]'],
- ['return' => 'tns:user_result_array']
- );
- $s->register(
- 'WSUser.CreateUser',
- [
- 'secret_key' => 'xsd:string',
- 'firstname' => 'xsd:string',
- 'lastname' => 'xsd:string',
- 'status' => 'xsd:int',
- 'loginname' => 'xsd:string',
- 'password' => 'xsd:string',
- 'encrypt_method' => 'xsd:string',
- 'user_id_field_name' => 'xsd:string',
- 'user_id_value' => 'xsd:string',
- 'visibility' => 'xsd:int',
- 'email' => 'xsd:string',
- 'language' => 'xsd:string',
- 'phone' => 'xsd:string',
- 'expiration_date' => 'xsd:string',
- 'extras' => 'tns:extra_field',
- ],
- ['return' => 'xsd:int']
- );
- $s->wsdl->addComplexType(
- 'user_create',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'firstname' => ['name' => 'firstname', 'type' => 'xsd:string'],
- 'lastname' => ['name' => 'lastname', 'type' => 'xsd:string'],
- 'status' => ['name' => 'status', 'type' => 'xsd:int'],
- 'loginname' => ['name' => 'loginname', 'type' => 'xsd:string'],
- 'password' => ['name' => 'password', 'type' => 'xsd:string'],
- 'encrypt_method' => [
- 'name' => 'encrypt_method',
- 'type' => 'xsd:string',
- ],
- 'user_id_field_name' => [
- 'name' => 'user_id_field_name',
- 'type' => 'xsd:string',
- ],
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- 'visibility' => ['name' => 'visibility', 'type' => 'xsd:int'],
- 'email' => ['name' => 'email', 'type' => 'xsd:string'],
- 'language' => ['name' => 'language', 'type' => 'xsd:string'],
- 'phone' => ['name' => 'phone', 'type' => 'xsd:string'],
- 'expiration_date' => [
- 'name' => 'expiration_date',
- 'type' => 'xsd:string',
- ],
- 'extras' => ['name' => 'extras', 'type' => 'tns:extra_field'],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_create_result',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- 'user_id_generated' => [
- 'name' => 'user_id_generated',
- 'type' => 'xsd:int',
- ],
- 'result' => ['name' => 'result', 'type' => 'tns:result'],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_create_result_array',
- 'complexType',
- 'array',
- '',
- 'SOAP-ENC:Array',
- [],
- [
- [
- 'ref' => 'SOAP-ENC:arrayType',
- 'wsdl:arrayType' => 'tns:user_create_result[]',
- ],
- ],
- 'tns:user_create_result'
- );
- $s->register(
- 'WSUser.CreateUsers',
- [
- 'secret_key' => 'xsd:string',
- 'users' => 'tns:user_create[]',
- ],
- ['return' => 'tns:user_create_result_array']
- );
- $s->register(
- 'WSUser.EditUser',
- [
- 'secret_key' => 'xsd:string',
- 'user_id_field_name' => 'xsd:string',
- 'user_id_value' => 'xsd:string',
- 'firstname' => 'xsd:string',
- 'lastname' => 'xsd:string',
- 'status' => 'xsd:int',
- 'loginname' => 'xsd:string',
- 'password' => 'xsd:string',
- 'encrypt_method' => 'xsd:string',
- 'email' => 'xsd:string',
- 'language' => 'xsd:string',
- 'phone' => 'xsd:string',
- 'expiration_date' => 'xsd:string',
- 'extras' => 'tns:extra_field',
- ]
- );
- $s->wsdl->addComplexType(
- 'user_edit',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'user_id_field_name' => [
- 'name' => 'user_id_field_name',
- 'type' => 'xsd:string',
- ],
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- 'firstname' => ['name' => 'firstname', 'type' => 'xsd:string'],
- 'lastname' => ['name' => 'lastname', 'type' => 'xsd:string'],
- 'status' => ['name' => 'status', 'type' => 'xsd:int'],
- 'loginname' => ['name' => 'loginname', 'type' => 'xsd:string'],
- 'password' => ['name' => 'password', 'type' => 'xsd:string'],
- 'encrypt_method' => [
- 'name' => 'encrypt_method',
- 'type' => 'xsd:string',
- ],
- 'email' => ['name' => 'email', 'type' => 'xsd:string'],
- 'language' => ['name' => 'language', 'type' => 'xsd:string'],
- 'phone' => ['name' => 'phone', 'type' => 'xsd:string'],
- 'expiration_date' => [
- 'name' => 'expiration_date',
- 'type' => 'xsd:string',
- ],
- 'extras' => ['name' => 'extras', 'type' => 'tns:extra_field'],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_edit_result',
- 'complexType',
- 'struct',
- 'all',
- '',
- [
- 'user_id_value' => [
- 'name' => 'user_id_value',
- 'type' => 'xsd:string',
- ],
- 'result' => ['name' => 'result', 'type' => 'tns:result'],
- ]
- );
- $s->wsdl->addComplexType(
- 'user_edit_result_array',
- 'complexType',
- 'array',
- '',
- 'SOAP-ENC:Array',
- [],
- [
- [
- 'ref' => 'SOAP-ENC:arrayType',
- 'wsdl:arrayType' => 'tns:user_edit_result[]',
- ],
- ],
- 'tns:user_edit_result'
- );
- $s->register(
- 'WSUser.EditUsers',
- [
- 'secret_key' => 'xsd:string',
- 'users' => 'tns:user_edit[]',
- ],
- ['return' => 'tns:user_edit_result_array']
- );
|