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