Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 1st December 2012, 09:39
aneeshnl aneeshnl is offline
Junior Member
 
Join Date: Aug 2012
Posts: 14
Thanks: 2
Thanked 1 Time in 1 Post
Default Remoting API problems

Hello,

I am trying to use remoting API to my ISPconfig3.5 Beta1. I have an installation of ISPconfig on my test server and I do development on my local machine.

When trying to execute client add.php, its showing as:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>login_failed</faultcode><faultstring>The login failed. Username or password wrong.</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Error: The login failed. Username or password wrong.
Please let me know where I am doing wrong.

My soap_config.php

PHP Code:
<?php
$username 
'admin';
$password 'admin';

/*
$soap_location = 'http://localhost:8080/ispconfig3_3.0.5/interface/web/remote/index.php';
$soap_uri = 'http://localhost:8080/ispconfig3_3.0.5/interface/web/remote/';
*/

$soap_location 'https://172.16.1.121:8080/remote/index.php';
$soap_uri 'https://172.16.1.121:8080/remote/';
?>
My soap_database_add.php

PHP Code:
<?php

$username 
'admin';
$password 'admin';

$soap_location 'https://172.16.1.121:8080/remote/index.php';
$soap_uri 'https://172.16.1.121:8080/remote/';

$client = new SoapClient(null, array('location' => $soap_location,
                                     
'uri'      => $soap_uri));
try {
    if(
$session_id $client->login($username,$password)) {
                    echo 
"Logged:".$session_id."<br />\n";
}

$database_type 'mysql'//Only mysql type avaliable more types coming soon.
$database_name 'dbispconfig';
$database_username 'root';
$database_password '<my MySQL root password>';
$database_charset ''// blank = db default, latin1 or utf8
$database_remoteips ''//remote ips separated by commas

$params = array(
          
'server_id' => 1,
                
'type' => $database_type,
                
'database_name' => $database_name,
                
'database_user' => $database_username,
                
'database_password' => $database_password,
                
'database_charset' =>  $database_charset,
                
'remote_access' => 'n'// n disabled - y enabled
                
'active' => 'y'// n disabled - y enabled
                
'remote_ips' => $database_remoteips
                
);

$client_id 1;
$database_id $client->sites_database_add($session_id$client_id$params);

if(
$client->logout($session_id)) {
    echo 
"Logout.<br />\n";
}


} catch (
SoapFault $e) {
        die(
'Error: '.$e->getMessage());
}

?>
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAP API problems in 3.0.4.6 Disassembler Developers' Forum 9 25th November 2012 10:14
Remoting API Documentation joecoder Developers' Forum 8 3rd December 2011 11:28
Retrieving data from remoting API without IDs edispah Developers' Forum 3 9th November 2011 16:36
About Remoting Framework API mark0168 General 1 28th March 2008 15:08
Empty Recycle Bin jon335 General 40 6th May 2006 12:56


All times are GMT +2. The time now is 16:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.