Remoting Framework

Discussion in 'General' started by bwaymark, Jan 18, 2009.

  1. bwaymark

    bwaymark New Member

    Hiya Everyone:

    I am trying to get the Remote Framework to tell me the users I have setup for 'web51' on my dev server. However, when I script the nothing happens. I've created a user in Remote Framework with permissions for everything. I've tried logging in using the proper username and password I created, and nothing happens, and I've tried using a wrong password to see if I could get an error, but I am getting none. I then tried an 'echo $sessions_id' and it seems that the session id variable is empty.

    Anyone have any ideas what I am doing wrong?

    I've am running ISPConfig Version: 2.2.27 running ispconfig_remoting_ext_beta4.2.1_os.pkg and libxml2-dev 2.6.27.dfsg-6. I've installed Remoting Framework, adding a user, and modified the test script to be:

    * ISPConfig Soap Connector
    * Version 1.3
    * (c) Projektfarm GmbH 2005
    * This script requires PHP with CURL extension

    // Insert here your 42go Server
    $server_url = "https://<webserver>:81";

    // creating object for soap_client
    $soap_client = new soap_client($server_url.'/remote/index.php');

    // Username and Password of the remoting user (not identical
    // with the user to log into the web interface!)
    $parameters = array('user' => 'admin',
    'pass' => 'admin');

    // Login into 42go Server
    $session_id = $soap_client->call('login',$parameters);

    echo "Session id:".$session_id."<BR>";

    // Error Check
    if($err = $soap_client->getError()) die("Error: ".$err);

    $params = array ( 'sid' => $session_id,
    'module' => 'web',
    'function' => 'user_list',
    'params' => array ( web_id => 'web51' // web_title or web_id

    $users = $soap_client->call('service',$params);
    if($err = $soap_client->getError()) die("Error: ".$err);

    // 42go Server logout
    $soap_client->call('logout',array('sid' => $session_id));

    // Error Check
    if($err = $soap_client->getError()) die("Error: ".$err);

    echo "<br>Script end ...";



  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Does the PHP in the webspace where you run the remoting client from has SSL and curl enabled? Otherwise it is not able to connect with https to ispconfig.
  3. bwaymark

    bwaymark New Member

    Hiya Till:

    SSl and cURL are indeed enabled. If I put https://<server address>:81/remote/index.php into a browser I get an XML file in return with a 'no method' error which is what I'd expect if things were working correctly (as I am not passing any params in) but I am not familiar enough with SOAP to be sure.

    When I do a php info I get:

    cURL support enabled
    cURL Information libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3 libidn/0.6.5

    OpenSSL support enabled
    OpenSSL Version OpenSSL 0.9.8c 05 Sep 2006

    When I access the remote/index.php page I get:

    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="">


    <faultactor>method '' not defined in service ''</faultactor>

    <soapVal xsi:type="xsd:string"/>


    soap_server: entering parseRequest() on 12:33 2009-01-19
    soap_server: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    soap_server: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    soap_server: Accept-Encoding: gzip,deflate
    soap_server: Accept-Language: en-us,en;q=0.5
    soap_server: Connection: keep-alive
    soap_server: Host: <server address>:81
    soap_server: Keep-Alive: 300
    soap_server: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008120122 Firefox/3.0.5
    soap_server: got encoding: UTF-8
    soap_server: method name:
    soap_server: method '' not found!
    soap_server: parser debug:
    soap_parser: xml was empty, didn't parse!

    soap_server: server sending...


    Any ideas?


  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This looks fine so far. maybe you should take a look into the soap.lib.php dile, which contains the nusoap library which is a common soap library if you can enable debugging for the soap connection somewhere.
  5. bwaymark

    bwaymark New Member

    Hum.... looked at the soap.lib.php but it doesn't look like there is any 'turn debugging on' option.

    I did try adding the code:

    shell_exec("touch /v/web51/bentesting");

    into the function login on remove/index.php and it doesn't look like that function is being called.

    Any other ideas?
    Last edited: Jan 19, 2009
  6. grandpagenocide

    grandpagenocide ISPConfig Developer ISPConfig Developer

    did you try any of the other test functions other than user_list? did you try adding a user? I remember someone telling me abotu a bug in the list function, that i havent had a chance to look at.
    One other stupid sounding thing to try, add a second remote user, and try using the second remote user, I have had issue in the past where the first user didnt work but a second user did

    On a posative note, i hope to have some time soon to rip apart the remote framework again soon and add any new features ispc has added while i have been in lala land.
    Last edited: Jan 22, 2009

Share This Page