SOAP and Moodle

Re: SOAP and Moodle

by Roberto Perez-Rodriguez -
Number of replies: 0

Hi Ben

For both scenarios I suggest you to use the NuSOAP library, which greatly simplifies consuming external Web Services from Moodle.

The following code may result useful to you:

1  require_once($CFG->libdir.'/soap/nusoap.php');

2  $wsdl = "http://ip:port/foo/bar?wsdl";
3  $client = new soap_client($wsdl, 'wsdl');
4  $param = array($section);
5  $result = $client->call('name_of_method', $param);
Regards,
Roberto Perez-Rodriguez
University of Vigo