I have made webservices before in Java, PHP and. I will write a tutorial with full steps (admin + code) on how to create a client. A tracker issue has so much more weight into decision to assign a developer to a bug/improvement task. I really suggest you to use the Moodle Tracker. I guess all the admin part will end to be hidden behind few quick and easy wizards for common web service use cases. You need to enable it into Admin > Plugins > Webservice > Manage protocols There are some Moodle web service function documentation available if you go into a user (non admin) Settings > Profile > security keys. Moodle SOAP and XMLRPC servers are basically just Zend server so if you follow Zend documentation you should be able to write a client. Because it's all new, for security reasons, mainly only experienced Moodle administrator and experienced web service php coder can manage their way into it. Yes at the moment the whole web service thing is complicated. $groups = $ xmlrpcclient->call($function, $params) $params = array('groupids' => $groupids) '/webservice/xmlrpc/server.php', $token) $xmlrpcclient = new webservice_xmlrpc_client(HTTP_REMOTE_MOODLE. Ī PHP Client for Moodle 2.0 web service could be something like: The main documentation about web service is there. Finally you can have look at /webservice/xmlrpc/testwebservice.php to know how to use it. To answer the last question, are there any XML-RCP server and client samples for 2.0: the new Moodle 2.0 xmlrpc server is in /webservice/xmlrpc/server.php and you can also find a PHP xml-rpc client for this server in /webservice/xmlrpc/lib.php. Anyway Bill was right to post Mnet web service question here, I forgot that Mnet was also a collection of web service. I got carried away by all the Mnet thing. I agree I should have at least answer the last question. Most of the Bill post is Mnet code related. If I hack plaintext_is_ok() to return true, I get Fault 711: 'The signature verification failed.' Do all XML-RPC client calls need to be signed now, and if so, how?Īre there any XML-RCP server and client samples for 2.0? I end up with Fault 7021: 'The transport method you are trying to use is not permitted.' The snag seems to be with mnet/remote_client.php:plaintext_is_ok() which does not recognize my box as a trusted host. I followed the above steps and also tried to follow this thinking the various mnet_ table entries would be created automatically. I also tried 2.0 RC1 and have had no success getting my module working. With 1.9.9, is there a UI or automated way of making these table entries? After tracing error codes to the source and backtracking, I found that mnet/lib.php:mnet_permit_rpc_call() needs some entries in tables mnet_host2service, mnet_service, mnet_service2rpc, and mnet_rpc. I recently tried my module with 1.9.9 and initially it did not work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |