cm_soap_forum.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. require_once(dirname(__FILE__).'/cm_webservice_forum.php');
  3. require_once(dirname(__FILE__).'/cm_soap.php');
  4. /**
  5. * Configures the WSCourse SOAP service
  6. */
  7. $s = WSCMSoapServer::singleton();
  8. $s->register(
  9. 'WSCMForum.get_foruns_id',
  10. array(
  11. 'username' => 'xsd:string',
  12. 'password' => 'xsd:string',
  13. 'course_code' => 'xsd:string'
  14. ),
  15. array('return' => 'xsd:string'),
  16. 'urn:WSCMService',
  17. '',
  18. '',
  19. '',
  20. 'Retorna o ID dos foruns de uma disciplina.'
  21. );
  22. $s->register(
  23. 'WSCMForum.get_forum_title',
  24. array(
  25. 'username' => 'xsd:string',
  26. 'password' => 'xsd:string',
  27. 'course_code' => 'xsd:string',
  28. 'forum_id' => 'xsd:string'
  29. ),
  30. array('return' => 'xsd:string'),
  31. 'urn:WSCMService',
  32. '',
  33. '',
  34. '',
  35. 'Retorna o valor do titulo de um forum_id.'
  36. );
  37. $s->register(
  38. 'WSCMForum.get_forum_threads_id',
  39. array(
  40. 'username' => 'xsd:string',
  41. 'password' => 'xsd:string',
  42. 'course_code' => 'xsd:string',
  43. 'forum_id' => 'xsd:string'
  44. ),
  45. array('return' => 'xsd:string'),
  46. 'urn:WSCMService',
  47. '',
  48. '',
  49. '',
  50. 'Retorna o ID das threads de um forum_id.'
  51. );
  52. $s->register(
  53. 'WSCMForum.get_forum_thread_data',
  54. array(
  55. 'username' => 'xsd:string',
  56. 'password' => 'xsd:string',
  57. 'course_code' => 'xsd:string',
  58. 'thread_id' => 'xsd:string',
  59. 'field' => 'xsd:string'
  60. ),
  61. array('return' => 'xsd:string'),
  62. 'urn:WSCMService',
  63. '',
  64. '',
  65. '',
  66. 'Retorna o campo field de um thread_id. Campos possiveis: title, date, sender, sender_name.'
  67. );
  68. $s->register(
  69. 'WSCMForum.get_forum_thread_title',
  70. array(
  71. 'username' => 'xsd:string',
  72. 'password' => 'xsd:string',
  73. 'course_code' => 'xsd:string',
  74. 'thread_id' => 'xsd:string'
  75. ),
  76. array('return' => 'xsd:string'),
  77. 'urn:WSCMService',
  78. '',
  79. '',
  80. '',
  81. 'Retorna o campo title de uma thread_id.'
  82. );
  83. $s->register(
  84. 'WSCMForum.get_posts_id',
  85. array(
  86. 'username' => 'xsd:string',
  87. 'password' => 'xsd:string',
  88. 'course_code' => 'xsd:string',
  89. 'thread_id' => 'xsd:string'
  90. ),
  91. array('return' => 'xsd:string'),
  92. 'urn:WSCMService',
  93. '',
  94. '',
  95. '',
  96. 'Retorna o ID dos posts de uma thread.'
  97. );
  98. $s->register(
  99. 'WSCMForum.get_post_data',
  100. array(
  101. 'username' => 'xsd:string',
  102. 'password' => 'xsd:string',
  103. 'course_code' => 'xsd:string',
  104. 'post_id' => 'xsd:string',
  105. 'field' => 'xsd:string'
  106. ),
  107. array('return' => 'xsd:string'),
  108. 'urn:WSCMService',
  109. '',
  110. '',
  111. '',
  112. 'Retorna o campo field de um post_id. Campos possiveis: title, text, date, sender ou sender_name.'
  113. );
  114. $s->register(
  115. 'WSCMForum.send_post',
  116. array(
  117. 'username' => 'xsd:string',
  118. 'password' => 'xsd:string',
  119. 'course_code' => 'xsd:string',
  120. 'forum_id' => 'xsd:string',
  121. 'thread_id' => 'xsd:string',
  122. 'title' => 'xsd:string',
  123. 'content' => 'xsd:string'
  124. ),
  125. array('return' => 'xsd:string'),
  126. 'urn:WSCMService',
  127. '',
  128. '',
  129. '',
  130. 'Envia um novo post ao forum_id.'
  131. );