Moodle 2.0.1 SOAP message example?

Re: Moodle 2.0.1 SOAP message example?

by Bill Antonia -
Number of replies: 0

Sorted!

I added a few lines to the moodle/lib/zend/Zend/Soap/Server.php at around line 807

public function handle($request = null)
{
if (null === $request) {
$request = file_get_contents('php://input');
}

//Added code
$fp=fopen("/somewriteablepath/soaptest.txt","w");
fputs($fp,print_r($request,1));
fclose($fp);
//End added code

Then do a test from within Moodle to create a user through SOAP web services.

From the resulting output I was able to form a SOAP message using SAAJ to create a simple course, see the attachment. Will extend this to create a Java SOAP library.