soap_session.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Configures the WSSession SOAP service
  5. * @package chamilo.webservices
  6. */
  7. require_once __DIR__.'/webservice_session.php';
  8. require_once __DIR__.'/soap.php';
  9. $s = WSSoapServer::singleton();
  10. $s->register(
  11. 'WSSession.CreateSession',
  12. array(
  13. 'secret_key' => 'xsd:string',
  14. 'name' => 'xsd:string',
  15. 'start_date' => 'xsd:string',
  16. 'end_date' => 'xsd:string',
  17. 'nb_days_access_before' => 'xsd:int',
  18. 'nb_days_access_after' => 'xsd:int',
  19. 'nolimit' => 'xsd:int',
  20. 'visibility' => 'xsd:int',
  21. 'user_id_field_name' => 'xsd:string',
  22. 'user_id_value' => 'xsd:string',
  23. 'session_id_field_name' => 'xsd:string',
  24. 'session_id_value' => 'xsd:string',
  25. 'extras' => 'tns:extra_field',
  26. ),
  27. array('return' => 'xsd:int')
  28. );
  29. $s->register(
  30. 'WSSession.DeleteSession',
  31. array(
  32. 'secret_key' => 'xsd:string',
  33. 'session_id_field_name' => 'xsd:string',
  34. 'session_id_value' => 'xsd:string',
  35. )
  36. );
  37. $s->register(
  38. 'WSSession.EditSession',
  39. array(
  40. 'secret_key' => 'xsd:string',
  41. 'name' => 'xsd:string',
  42. 'start_date' => 'xsd:string',
  43. 'end_date' => 'xsd:string',
  44. 'nb_days_access_before' => 'xsd:int',
  45. 'nb_days_access_after' => 'xsd:int',
  46. 'nolimit' => 'xsd:int',
  47. 'visibility' => 'xsd:int',
  48. 'user_id_field_name' => 'xsd:string',
  49. 'user_id_value' => 'xsd:string',
  50. 'session_id_field_name' => 'xsd:string',
  51. 'session_id_value' => 'xsd:string',
  52. 'extras' => 'tns:extra_field',
  53. )
  54. );
  55. $s->register(
  56. 'WSSession.SubscribeUserToSession',
  57. array(
  58. 'secret_key' => 'xsd:string',
  59. 'user_id_field_name' => 'xsd:string',
  60. 'user_id_value' => 'xsd:string',
  61. 'session_id_field_name' => 'xsd:string',
  62. 'session_id_value' => 'xsd:string',
  63. )
  64. );
  65. $s->register(
  66. 'WSSession.UnsubscribeUserFromSession',
  67. array(
  68. 'secret_key' => 'xsd:string',
  69. 'user_id_field_name' => 'xsd:string',
  70. 'user_id_value' => 'xsd:string',
  71. 'session_id_field_name' => 'xsd:string',
  72. 'session_id_value' => 'xsd:string',
  73. )
  74. );
  75. $s->register(
  76. 'WSSession.SubscribeTeacherToSessionCourse',
  77. array(
  78. 'secret_key' => 'xsd:string',
  79. 'user_id_field_name' => 'xsd:string',
  80. 'user_id_value' => 'xsd:string',
  81. 'session_id_field_name' => 'xsd:string',
  82. 'session_id_value' => 'xsd:string',
  83. 'course_id_field_name' => 'xsd:string',
  84. 'course_id_value' => 'xsd:string',
  85. )
  86. );
  87. $s->register(
  88. 'WSSession.UnsubscribeTeacherFromSessionCourse',
  89. array(
  90. 'secret_key' => 'xsd:string',
  91. 'user_id_field_name' => 'xsd:string',
  92. 'user_id_value' => 'xsd:string',
  93. 'session_id_field_name' => 'xsd:string',
  94. 'session_id_value' => 'xsd:string',
  95. 'course_id_field_name' => 'xsd:string',
  96. 'course_id_value' => 'xsd:string',
  97. )
  98. );
  99. $s->register(
  100. 'WSSession.SubscribeCourseToSession',
  101. array(
  102. 'secret_key' => 'xsd:string',
  103. 'course_id_field_name' => 'xsd:string',
  104. 'course_id_value' => 'xsd:string',
  105. 'session_id_field_name' => 'xsd:string',
  106. 'session_id_value' => 'xsd:string',
  107. )
  108. );
  109. $s->register(
  110. 'WSSession.UnsubscribeCourseFromSession',
  111. array(
  112. 'secret_key' => 'xsd:string',
  113. 'course_id_field_name' => 'xsd:string',
  114. 'course_id_value' => 'xsd:string',
  115. 'session_id_field_name' => 'xsd:string',
  116. 'session_id_value' => 'xsd:string',
  117. )
  118. );