title: Moodle Web Services via SOAP from PHP
body: <p>I'm trying to connect to our moodle server via SOAP web service from PHP.
  I'm trying to run the mod_assign_get_assignments function, but I'm receiving a 'invalidparameter' message.
  I can get the function to return the expected data via REST, but need to get it working via SOAP. </p>
  
  <p>Here is the code I'm using...</p>
  
  <pre><code>&lt;?php
  
  $serverurl = "http://moodlehost/webservice/soap/server.php?wsdl=1&amp;wstoken=763b54a6exxxx989be353xxxx6cca5f6";
  $soapClient = new SoapClient($serverurl);
  
   try
      {
          $soapClient-&gt;__soapCall('mod_assign_get_assignments', array("courseids" =&gt; array(10889), "includenotenrolledcourses" =&gt; 1));
      }
      catch (Exception $e)
      {
          echo("&lt;pre&gt;");
          print_r($e);
          echo("&lt;/pre&gt;");
      }
  
  ?&gt;
  </code></pre>
  
  <p>Can someone please try this against their own moodle server and see if you get an error as I am?? </p>
  
  <p>..or I'd love it if someone could point out what I'm doing wrong.</p>
  
  <p>..is it just me, or is the moodle web services documentation hard to follow?</p>