XML-RPC methods?

XML-RPC methods?

by Catalin Maican -
Number of replies: 5
Hello,

As I understand Moodle can expose some APIs to trusted hosts? I would like to know where can I find the methods exposed _by default_ on a Moodle installation.

Thank you,
Catalin
Average of ratings: -
In reply to Catalin Maican

Re: XML-RPC methods?

by Donal McMullan -
Hi Catalin - have you seen the Web Services API document? If you let me know what's missing from that, I can try to improve it.

Cheers - Donal
In reply to Donal McMullan

Re: XML-RPC methods?

by Catalin Maican -
Hi,
Thank you for replying.

I have seen that document but I'm not clarified. I was wondering how can I find a complete list of methods exposed via XML-RPC... If "system/listMethods" does what it says (list methods) how can I access this via a web interface (like the WSDL for a web service)?
Also, the same for "system/methodSignature"... I need to know the method name first before finding the signature, isn't it?

I have found an implementation of xml-rpc (https://secure.linuxbox.com/tiki/tiki-index.php?page=moodle_xmlrpc) where I can see the name of the methods.
I'm also familiar with a WS implementation (MoodleWS — Intranet du Premier Cycle)

BTW. I would like to use xml-rpc as a communication method between Moodle and DotNetNuke (ASP.NET)

Thanks,
Catalin
In reply to Catalin Maican

Re: XML-RPC methods?

by Donal McMullan -
Hi Catalin - just last night I updated a file called:
/mnet/testclient.php

It hadn't been updated for a long time, so I completely re-wrote it to be a "service browser" for remote Moodle sites. It shows logged-in administrators a list of hosts that they have configured relationships with.

Click on a host, and you see a list of services that they are offering to your Moodle. THE ADMINISTRATOR MUST HAVE ENABLED THE SERVICES FOR YOUR MOODLE, OR THEY WON'T APPEAR HERE.

Below this is listed the methods that the Moodle is offering to your Moodle. THE ADMINISTRATOR MUST HAVE ENABLED THE SERVICES FOR YOUR MOODLE, OR THE METHODS WON'T APPEAR HERE.

You can click on a service, and the browser will display only the methods that are enabled by that service (so it will actually display less information).

If you click on a method, the page will display the signature and description for that method.

The signature and description are generated automatically from the Moodle inline documentation. We borrowed some docblock-parsing software from another open-source project, so the descriptions, etc. will not be that excellent. I hope to get time to improve the documentation of some of the exported functions soon, so that this browser is more useful to people like you who are trying to use the software for integration with non-moodle projects.

If you can update your Moodle and test this code for me, I'd really appreciate it. I hope it's useful - if you have suggestions, can you add them as issues to the Moodle tracker?

Thanks Catalin
In reply to Donal McMullan

Re: XML-RPC methods?

by Catalin Maican -
Hi,

1. I have copied the new file;
2. I (think) have installed a SSL certificate

but, when navigating to the /mnet/testclient.php in browser I get the following errors: (both on localhost and my public IP address)....

What did I do wrong ? I mean, I don't know if I didn't install something correctly or ?

Thank you,
Catalin


Warning: openssl_sign() [function.openssl-sign]: supplied key param cannot be coerced into a private key in D:\Moodle\moodle\moodle\mnet\environment.php on line 179


Services available on host:

[REPLACED_PUBLIC_IP_]


Warning: Invalid argument supplied for foreach() in D:\Moodle\moodle\moodle\mnet\testclient.php on line 58
Service ID Service Version They Publish They Subscribe

Warning: openssl_sign() [function.openssl-sign]: supplied key param cannot be coerced into a private key in D:\Moodle\moodle\moodle\mnet\environment.php on line 179


Methods [REPLACED_PUBLIC_IP_]


Warning: Invalid argument supplied for foreach() in D:\Moodle\moodle\moodle\mnet\testclient.php on line 102
Method Options