soap_session.php 3.5 KB

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