Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Creating a web service and a web service function: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 1: Line 1:
First you need to read and execute the administration manual [[Setting_up_a_web_service]]. Now you should be more familiar about how web services are set into Moodle.
First you need to read and execute the administration manual [[Setting_up_a_web_service]]. Now you should be more familiar about how web services are set into Moodle.
== Preparation ==
Identify:
* core function(s) you need to call (or/and write)
* the param types that new to be send to your web service function
* the returned value types
* the user capabilities (it most of the time the ones logically required by the core functions)


== declare your web service functions ==
== declare your web service functions ==
== declare your web service functions ==
== declare your web service ==
Even for security purpose, you should avoid to define a service In some case you will want to force group of web service.
== define your external functions ==
== define your external functions ==
== define your external function description ==
== define your external function description ==
== test your web service function with default Moodle test client ==
== test your web service function with default Moodle test client ==
== create your own client ==
== create your own client ==

Revision as of 07:17, 20 November 2009

First you need to read and execute the administration manual Setting_up_a_web_service. Now you should be more familiar about how web services are set into Moodle.

Preparation

Identify:

  • core function(s) you need to call (or/and write)
  • the param types that new to be send to your web service function
  • the returned value types
  • the user capabilities (it most of the time the ones logically required by the core functions)

declare your web service functions

declare your web service

Even for security purpose, you should avoid to define a service In some case you will want to force group of web service.

define your external functions

define your external function description

test your web service function with default Moodle test client

create your own client