我在wsdl上收到错误

时间:2016-02-13 07:50:32

标签: php wsdl moodle

我正在尝试访问moodle上的Web服务。但是我得到错误的开始标记,'<'在第118行的C:\ wamp \ www \ curlsimp.php中找不到。任何人都可以告诉我这是什么问题?

    $functionname = 'core_user_create_users';
    $user1 = new stdClass();
     $user1->username = 'abcd';
    $user1->password =  'Password123!';
    $user1->firstname = 'ali';
    $user1->lastname = 'asdsad';
   $user1->email = 'asd@asd.com';
    $user1->city = 'apo';
    $user1->country = 'addfa';
     $user1->auth = 'manual';
    $params = array($user1);


   echo $WSDL;

   // SOAP CALL
    $serverurl = 'http://localhost/moodle/webservice/soap/server.php?<WSDL>&wstoken=57e86ddeb6e132338a629ffef3552a9d';
 ///Do the main soap call
   $client = new SoapClient($serverurl);
   try {
  $resp = $client->__soapCall($functionname, array($params));
   }
 catch (SoapFault $e) {
 exit($e->faultstring);
     }

0 个答案:

没有答案