Problem getting client using remoting call

Discussion in 'Installation/Configuration' started by kzy, Apr 2, 2007.

  1. kzy

    kzy New Member


    I am unable to use the 'kunde_get' function. I've tried two different implementations of soap clients which both get the same error:

    Catchable fatal error: Object of class soap_fault could not be converted to string in <b>/home/admispconfig/ispconfig/lib/classes/ispconfig_soap.obj.php on line 0

    the 'kunde_list' does function while trying to add a new client also gets the same error.

    POST /remote/index.php HTTP/1.0
    User-Agent: NuSOAP v0.6.3
    Host: clients.test
    Content-Type: text/xml; charset="ISO-8859-1"
    Content-Length: 730
    SOAPAction: ""
    <?xml version="1.0" encoding="ISO-8859-1"?><?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" xmlns:si="" SOAP-ENV:encodingStyle="">
    		<ns1:service xmlns:ns1="">
    			<sid xsi:type="xsd:string">03c2ba798eb6b20d0677f9dcda778457</sid>
    			<module xsi:type="xsd:string">kunde</module>
    			<function xsi:type="xsd:string">kunde_get</function>
    				<kunde_title xsi:type="xsd:string">Kunde3</kunde_title>
    HTTP/1.1 200 OK
    Date: Mon, 02 Apr 2007 21:35:01 GMT
    Server: Apache/1.3.37 (Unix) PHP/5.2.1 mod_ssl/2.8.28 OpenSSL/0.9.8e
    X-Powered-By: PHP/5.2.1
    Set-Cookie: PHPSESSID=f807e60c6c9fc8af441c58c12cef6374; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Connection: close
    Content-Type: text/html

    Catchable fatal error: Object of class soap_fault could not be converted to string in /home/admispconfig/ispconfig/lib/classes/ispconfig_soap.obj.php on line 0

    Using Etch with latest updates.

    Thanks alot in advance.
    Last edited: Apr 3, 2007
  2. kzy

    kzy New Member

    ah, I guess this is the way of it saying something like 'user not found' I got it working now, I was confusing different fields.

    Second question, is it possible to select a user by 'webadmin_user' ?

    $params = array (         'sid'        => $session_id,
    'module'         => 'kunde',
    'function'         => 'kunde_get',
    'params'        => array ( webadmin_user => "weblogin"));
    for me this does not appear to work, correct?

    I'd like give users access on another site by checking the password hash and webadmin_user. Is there another way without getting the complete user list?

    Testing a little further I try to add a client using the supplied example and only changing the reseller.

    This too results in a 'Object of class soap_fault could not be converted...' error.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" xmlns:si="" SOAP-ENV:encodingStyle="">
    		<ns1:service xmlns:ns1="">
    			<sid xsi:type="xsd:string">b7c28f4dd398f1ada704c45f5c92f347</sid>
    			<module xsi:type="xsd:string">kunde</module>
    			<function xsi:type="xsd:string">kunde_add</function>
    				<reseller_title xsi:type="xsd:string">admin</reseller_title>
    				<kunde_title xsi:type="xsd:string">Kunde6</kunde_title>
    				<kunde_anrede xsi:type="xsd:string">Herr</kunde_anrede>
    				<kunde_firma xsi:type="xsd:string">Kunde6</kunde_firma>
    				<kunde_vorname xsi:type="xsd:string">Tom</kunde_vorname>
    				<kunde_name xsi:type="xsd:string">Sawyer</kunde_name>
    				<kunde_strasse xsi:type="xsd:string">Hauptstr. 1</kunde_strasse>
    				<kunde_plz xsi:type="xsd:string">12345</kunde_plz>
    				<kunde_ort xsi:type="xsd:string">Hauptstadt</kunde_ort>
    				<kunde_land xsi:type="xsd:string">Deutschland</kunde_land>
    				<kunde_telefon xsi:type="xsd:string">0511 5469766</kunde_telefon>
    				<kunde_fax xsi:type="xsd:string">0511 9799655</kunde_fax>
    				<kunde_email xsi:type="xsd:string">[email protected]</kunde_email>
    				<kunde_internet xsi:type="xsd:string">http://www.kunde6.tld</kunde_internet>
    				<webadmin_user xsi:type="xsd:string">kunde6</webadmin_user>
    				<webadmin_passwort xsi:type="xsd:string">kunde6</webadmin_passwort>
    				<kunde_province xsi:type="xsd:string">Niedersachsen</kunde_province>
    the client does not exist. What could be wrong here?
  3. kzy

    kzy New Member

    Could somebody be so kind to comment on my findings here?

    1: It is strange that I can not create a client. Is this not implemented yet?

    2: Do you think it will be a good workaround if I just set the 'kunde_title' to be the same as 'kunde_web' to be able to check login credentials using the API?

    3: Is the 'object of soap_fault...' error normal beahavour if something has gone wrong?

    using the latest version of ispconfig and the latest version of the remoting tool on Etch.

  4. falko

    falko Super Moderator ISPConfig Developer

    I'm sorry, but I have no idea what could be wrong. :(

    Creating clients is implemented.
  5. Tommahawk

    Tommahawk New Member

    instead of returning soap fault which cannot be converted into a string just return a string

    e.g in /home/admispconfig/ispconfig/web/remote/index.php on line 105

    return $go_api->$module->errorMessage;
    // return new soap_fault('Client','',$go_api->$module->errorMessage);
  6. kzy

    kzy New Member

    yes, very nice that it is possible now, still have to look into it again :)


Share This Page