SOAP Error: looks like we got no XML document

Discussion in 'General' started by mrtnzlml, Jun 21, 2013.

  1. mrtnzlml

    mrtnzlml New Member

    Hi! I have problem with client_update remote API function. It returns SOAP Error: looks like we got no XML document...
    if($session_id = $client->login($username,$password)) {
    	echo 'Logged successfull. Session ID:'.$session_id.'<br />';    //OK
    $client_record = $client->client_get($session_id, $client_id);    //OK
    $vals['contact_name'] = 'brush';
    $new_record = array_merge($client_record, $vals);    //OK, contact_name changed
    $affected_rows = $client->client_update($session_id, $client_id, $reseller_id, $new_record);    //FAIL
    In catch $client->__getLastResponse() contains incomplete response:
    ... `usertheme` = 'default', `street` = '', `zip` = '', `city` = '', `state` = '', `country` = 'CZ', `telephone` = '', `mobile` = '', `fax` = '', `em
    (last em - probably email is incomplete) and SoapFault -> getMessage returns looks like we got no XML document.

    Any idea where is the problem?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The output is a sql error message, so there might be something wrong with the params array that you passed to the client_update function.
  3. mrtnzlml

    mrtnzlml New Member

    Is there any difference between result of function client_get and input params of function client_update? I tried this:
    $client_record = $client->client_get($session_id, $client_id);
    $client->client_update($session_id, $client_id, $reseller_id, $client_record);
    (Just get and immediately return back this record.) And i got almost the same... SOAP Error: looks like we got no XML document.
  4. mrtnzlml

    mrtnzlml New Member

    Any ideas please?
  5. mrtnzlml

    mrtnzlml New Member

    So I finally solved it. But that was really, really hard...
    Unfortunately function client_update doesn't work at all. I think there is bug in file in function getSQL on line 787 and 788. Creating SQL statement is not correct:
    $sql_update .= '`sys_userid` = '.$this->sys_userid.', ';
    $sql_update .= '`sys_groupid` = '.$this->sys_default_group.', ';
    After bug resolved:
    $sql_update .= '`sys_userid` = "'.$this->sys_userid.'", ';
    $sql_update .= '`sys_groupid` = "'.$this->sys_default_group.'", ';
    (quotation marks) Now it return correct SQL statement and function client_update works again. Please check this notice and please fix it as soon as possible.
  6. synxmax

    synxmax New Member

    Dude you saved my head and our wall , thank you thank you thank you


Share This Page