forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web service MDL-12886 documentation: better display, test if web serv…
…ices are enable, display return type
- Loading branch information
jerome
committed
Feb 26, 2009
1 parent
8bc590f
commit 839bd5a
Showing
4 changed files
with
132 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,39 @@ | ||
<?php // $Id$ | ||
$string['soapdocumentation'] = '<H2>SOAP Manual</H2> | ||
<b>1.</b> Call the method <b>tmp_get_token</b> on \"<i>http://remotemoodle/webservice/soap/zend_soap_server.php?wsdl</i>\"<br> | ||
Function parameter is an array: in PHP it would be array(\"username\" => \"wsuser\", \"password\" => \"wspassword\")<br> | ||
<b>1.</b> Call the method <b>tmp_get_token</b> on \"<i>http://remotemoodle/webservice/soap/server.php?wsdl</i>\"<br> | ||
The function parameter is an array: in PHP it would be array(\"username\" => \"wsuser\", \"password\" => \"wspassword\")<br> | ||
Return value is a token (integer)<br> | ||
<br> | ||
<b>2.</b> Then call a moodle web service method on \"<i>http://remotemoodle/webservice/soap/zend_soap_server.php?token=the_received_token&classpath=the_moodle_path&wsdl</i>\"<br> | ||
<b>2.</b> Then call a moodle web service method on \"<i>http://remotemoodle/webservice/soap/server.php?token=the_received_token&classpath=the_moodle_path&wsdl</i>\"<br> | ||
Every method has only one parameter which is an array.<br> | ||
<br> | ||
For example in PHP for this specific function:<br> | ||
Moodle path: <b>user</b><br> | ||
<b>tmp_delete_user</b>( string username, integer mnethostid, )<br> | ||
<b>tmp_delete_user</b>( string username , integer mnethostid )<br> | ||
You will call something like:<br> | ||
your_client->tmp_delete_user(array(\"username\" => \"username_to_delete\",\"mnethostid\" => 1))<br><br> | ||
'; | ||
$string['xmlrpcdocumentation'] = '<H2>XMLRPC Manual</H2> | ||
<b>1.</b> Call the method <b>authentication.tmp_get_token</b> on \"<i>http://remotemoodle/webservice/xmlrpc/zend_xmlrpc_server.php</i>\"<br> | ||
Function parameter is an array: in PHP it would be array(\"username\" => \"wsuser\", \"password\" => \"wspassword\")<br> | ||
<b>1.</b> Call the method <b>authentication.tmp_get_token</b> on \"<i>http://remotemoodle/webservice/xmlrpc/server.php</i>\"<br> | ||
The function parameter is an array: in PHP it would be array(\"username\" => \"wsuser\", \"password\" => \"wspassword\")<br> | ||
Return value is a token (integer)<br> | ||
<br> | ||
<b>2.</b> Then call a moodle web service method on \"<i>http://remotemoodle/webservice/xmlrpc/zend_xmlrpc_server.php?classpath=the_moodle_path&token=the_received_token</i>\"<br> | ||
<b>2.</b> Then call a moodle web service method on \"<i>http://remotemoodle/webservice/xmlrpc/server.php?classpath=the_moodle_path&token=the_received_token</i>\"<br> | ||
Every method has only one parameter which is an array.<br> | ||
<br> | ||
For example in PHP for this specific function:<br> | ||
Moodle path: <b>user</b><br> | ||
<b>tmp_delete_user</b>( string username, integer mnethostid, )<br> | ||
<b>tmp_delete_user</b>( string username , integer mnethostid )<br> | ||
You will call something like:<br> | ||
your_client->call(\"user.tmp_delete_user\", array(array(\"username\" => \"username_to_delete\",\"mnethostid\" => 1)))<br> | ||
'; | ||
$string['functionlist'] = 'list of web service functions'; | ||
$string['moodlepath'] = 'Moodle path'; | ||
$string['wspagetitle'] = 'Web services documentation'; | ||
$string['webservicesenable'] = 'Web services enable'; | ||
$string['protocolenable'] = '$a[0] protocol enable'; | ||
$string['ok'] = 'OK'; | ||
$string['fail'] = 'FAIL'; | ||
$string['wsuserreminder'] = 'Reminder: the Moodle administrator of this site needs to give you moodle/site:usewebservices capability.'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters