Creating a web service client: Difference between revisions
From MoodleDocs
No edit summary |
|||
Line 10: | Line 10: | ||
= PHP client examples = | = PHP client examples = | ||
PHP client sample code can be downloaded on [https://github.com/moodlehq/sample-ws-clients Github]. | |||
[[Category:Web Services]] | [[Category:Web Services]] |
Revision as of 09:27, 15 September 2011
Moodle 2.0
You need to have already setup a web service. You can get help from How to enable web services for ordinary users or How to enable web services for an external system . Then have a look to your security keys page. You'll find there your token and the web service documentation associated with this token.
Officially supported protocols
- REST: the Moodle REST server uses POST for parameters and XML for returned values. This server is not RESTfull.
- SOAP: the Moodle SOAP server is based on the Zend SOAP server (itself based on the PHP SOAP server). Zend publishes a Zend SOAP client. The current server implementation doesn't work with Java/.Net because we didn't generated a fully describe WSDL yet. If you are working on a Java/.Net client, follow or participate to the tracker issue MDL-20804
- XML-RPC: the Moodle XML-RPC server is based on Zend XML-RPC server. Zend also publishes a Zend XML-RPC client.
- AMF: the Moodle AMF server is based on the Zend AMF server. The test client can be found in Settings blocks > Site Administration > Development > Web service test client > AMF Test client.
PHP client examples
PHP client sample code can be downloaded on Github.