Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th May 2010, 11:01
bahadircolak bahadircolak is offline
Junior Member
 
Join Date: Jan 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remote framework: Creating domain alias

Hi,

I've uploaded the example files (test.php and soap.lib.php)

Modified these lines:

PHP Code:
$server_url "http://www.mydomain.com:8080";

$parameters = array('user' => 'myuser',
                    
'pass' =>  'mypass'); 
when I call:

PHP Code:
if($err $soap_client->getError()) die("Error: ".$err); 
there is no error. I think up to here it's ok...

When I try the code:

PHP Code:
$params = array (    'sid'       => $session_id,
                    
'module'    => 'reseller',
                    
'function'    => 'reseller_list',
                    
'params'    => '');


$reseller_list $soap_client->call('service',$params);
// Error Check
if($err $soap_client->getError()) die("Error: ".$err);
print_r($reseller_list); 
It gives the error: Error: SOAP-ENV:Server: Function 'service' doesn't exist

Also I wasn't able to find how to create a domain alias in the examples...

Would you help me please. Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 10th May 2010, 14:25
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

Which ISPConfig version do you use? You use the remoting framework for ISPConfig 2 and post here in the ISPConfig 3 forum. So your problem is most likely related to the fact that you use the wrong remoting Library for the installed ispconfig version.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 10th May 2010, 16:29
bahadircolak bahadircolak is offline
Junior Member
 
Join Date: Jan 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ooops... Sorry.

I use ISPConfig 3...

Where is the examples for it?
Reply With Quote
  #4  
Old 10th May 2010, 16:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

Quote:
Originally Posted by bahadircolak View Post
I use ISPConfig 3...

Where is the examples for it?
Download the ISPConfig 3.0.2.1 tar.gz from sourceforge and unpack it. Inside the tar.gz there is a directory with the name remote_client/examples/ which contains various examples. As we do not have examples for all functions yet, you might want to take a look at the file interface/lib/classes/remoting.inc.php too which contains the server side of the functions to get a list of all function names and their parameters.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 11th May 2010, 14:58
bahadircolak bahadircolak is offline
Junior Member
 
Join Date: Jan 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Till,

I'm checking the lib now, it looks very easy to use indeed.

I've found the function to add a domain alias (sites_web_aliasdomain_add).

I've checked web_aliasdomain.tform.php for parameters, and now it's working great. Here is the code in case of anyone finds it useful.

PHP Code:
$params = array(    'server_id' => 1// replace
                        
'domain' => 'test.com'//replace
                        
'type' =>'alias',
                        
'parent_domain_id' => 10// replace
                        
'redirect_type' =>'',
                        
'redirect_path' =>'',
                        
'subdomain' =>'*',
                        
'active' => 'y');
$client_id =1//replace

$client->sites_web_aliasdomain_add($session_id$client_id$params); 
Reply With Quote
  #6  
Old 24th May 2010, 23:02
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
 
Default

Straining through code to find functions is up there on the drudgery scale with forced listening of Vogon poetry. As I'm working on a project that uses this, I'll post the list of functions derived from interface/lib/classes/remoting.inc.php here for your amusement as well as some of the variables used in remote_client/examples/.

Code:
login($username, $password)
logout($session_id)
mail_domain_get($session_id, $domain_id)
mail_domain_add($session_id, $client_id, $params)
mail_domain_update($session_id, $client_id, $domain_id, $params)
mail_domain_delete($session_id, $domain_id)
mail_user_get($session_id, $primary_id)
mail_user_add($session_id,$domain_id, $client_id, $params)
mail_user_update($session_id, $client_id, $domain_id, $params)
mail_user_delete($session_id,$domain_id)
mail_user_filter_get($session_id, $primary_id)
mail_user_filter_add($session_id, $client_id, $params)
mail_user_filter_update($session_id, $client_id, $primary_id, $params)
mail_user_filter_delete($session_id,$domain_id)
mail_alias_get($session_id, $primary_id)
mail_alias_add($session_id,$domain_id, $client_id, $params)
mail_alias_update($session_id, $domain_id, $client_id, $params)
mail_alias_delete($session_id,$domain_id)
mail_forward_get($session_id, $primary_id)
mail_forward_add($session_id,$domain_id, $client_id, $params)
mail_forward_update($session_id, $domain_id, $client_id, $params)
mail_forward_delete($session_id,$domain_id)
mail_catchall_get($session_id, $primary_id)
mail_catchall_add($session_id,$domain_id, $client_id, $params)
mail_catchall_update($session_id, $domain_id, $client_id, $params)
mail_catchall_delete($session_id,$domain_id)
mail_transport_get($session_id, $primary_id)
mail_transport_add($session_id,$domain_id, $client_id, $params)
mail_transport_update($session_id, $domain_id, $client_id, $params)
mail_transport_delete($session_id,$domain_id)
mail_spamfilter_whitelist_get($session_id, $primary_id)
mail_spamfilter_whitelist_add($session_id,$domain_id, $client_id, $params)
mail_spamfilter_whitelist_update($session_id, $domain_id, $client_id, $params)
mail_spamfilter_whitelist_delete($session_id,$domain_id)
mail_spamfilter_blacklist_get($session_id, $primary_id)
mail_spamfilter_blacklist_add($session_id,$domain_id, $client_id, $params)
mail_spamfilter_blacklist_update($session_id, $domain_id, $client_id, $params)
mail_spamfilter_blacklist_delete($session_id,$domain_id)
mail_spamfilter_user_get($session_id, $primary_id)
mail_spamfilter_user_add($session_id,$domain_id, $client_id, $params)
mail_spamfilter_user_update($session_id, $domain_id, $client_id, $params)
mail_spamfilter_user_delete($session_id,$domain_id)
mail_policy_get($session_id, $primary_id)
mail_policy_add($session_id,$domain_id, $client_id, $params)
mail_policy_update($session_id, $domain_id, $client_id, $params)
mail_policy_delete($session_id,$domain_id)
mail_fetchmail_get($session_id, $primary_id)
mail_fetchmail_add($session_id,$domain_id, $client_id, $params)
mail_fetchmail_update($session_id, $domain_id, $client_id, $params)
mail_fetchmail_delete($session_id,$domain_id)
mail_whitelist_get($session_id, $primary_id)
mail_whitelist_add($session_id,$domain_id, $client_id, $params)
mail_whitelist_update($session_id, $domain_id, $client_id, $params)
mail_whitelist_delete($session_id,$domain_id)
mail_blacklist_get($session_id, $primary_id)
mail_blacklist_add($session_id,$domain_id, $client_id, $params)
mail_blacklist_update($session_id, $domain_id, $client_id, $params)
mail_blacklist_delete($session_id,$domain_id)
mail_filter_get($session_id, $primary_id)
mail_filter_add($session_id,$domain_id, $client_id, $params)
mail_filter_update($session_id, $domain_id, $client_id, $params)
mail_filter_delete($session_id,$domain_id)
client_get($session_id, $client_id)
client_get_id($session_id, $sys_userid)
client_add($session_id, $reseller_id, $params)
client_update($session_id, $reseller_id, $client_id, $params)
client_delete($session_id,$client_id)
sites_cron_get($session_id, $cron_id)
sites_cron_add($session_id, $client_id, $params)
sites_cron_update($session_id, $client_id, $cron_id, $params)
sites_cron_delete($session_id, $cron_id)
sites_database_get($session_id, $primary_id)
sites_database_add($session_id, $client_id, $params)
sites_database_update($session_id, $client_id, $primary_id, $params)
sites_database_delete($session_id, $primary_id)
sites_ftp_user_get($session_id, $primary_id)
sites_ftp_user_add($session_id, $client_id, $params)
sites_ftp_user_update($session_id, $client_id, $primary_id, $params)
sites_ftp_user_delete($session_id, $primary_id)
sites_shell_user_get($session_id, $primary_id)
sites_shell_user_add($session_id, $client_id, $params)
sites_shell_user_update($session_id, $client_id, $primary_id, $params)
sites_shell_user_delete($session_id, $primary_id)
sites_web_domain_get($session_id, $primary_id)
sites_web_domain_add($session_id, $client_id, $params)
sites_web_domain_update($session_id, $client_id, $primary_id, $params)
sites_web_domain_delete($session_id, $primary_id)
sites_web_aliasdomain_get($session_id, $primary_id)
sites_web_aliasdomain_add($session_id, $client_id, $params)
sites_web_aliasdomain_update($session_id, $client_id, $primary_id, $params)
sites_web_aliasdomain_delete($session_id, $primary_id)
sites_web_subdomain_get($session_id, $primary_id)
sites_web_subdomain_add($session_id, $client_id, $params)
sites_web_subdomain_update($session_id, $client_id, $primary_id, $params)
sites_web_subdomain_delete($session_id, $primary_id)
dns_zone_get($session_id, $primary_id)
dns_zone_add($session_id, $client_id, $params)
dns_zone_update($session_id, $client_id, $primary_id, $params)
dns_zone_delete($session_id, $primary_id)
dns_aaaa_get($session_id, $primary_id)
dns_aaaa_add($session_id, $client_id, $params)
dns_aaaa_update($session_id, $client_id, $primary_id, $params)
dns_aaaa_delete($session_id, $primary_id)
dns_a_get($session_id, $primary_id)
dns_a_add($session_id, $client_id, $params
dns_a_update($session_id, $client_id, $primary_id, $params)
dns_a_delete($session_id, $primary_id)
dns_alias_get($session_id, $primary_id)
dns_alias_add($session_id, $client_id, $params)
dns_alias_update($session_id, $client_id, $primary_id, $params)
dns_alias_delete($session_id, $primary_id)
dns_cname_get($session_id, $primary_id)
dns_cname_add($session_id, $client_id, $params)
dns_cname_update($session_id, $client_id, $primary_id, $params)
dns_cname_delete($session_id, $primary_id)
dns_hinfo_get($session_id, $primary_id)
dns_hinfo_add($session_id, $client_id, $params)
dns_hinfo_update($session_id, $client_id, $primary_id, $params)
dns_hinfo_delete($session_id, $primary_id)
dns_mx_get($session_id, $primary_id)
dns_mx_add($session_id, $client_id, $params)
dns_mx_update($session_id, $client_id, $primary_id, $params)
dns_mx_delete($session_id, $primary_id)
dns_ns_get($session_id, $primary_id)
dns_ns_add($session_id, $client_id, $params)
dns_ns_update($session_id, $client_id, $primary_id, $params)
dns_ns_delete($session_id, $primary_id)
dns_ptr_get($session_id, $primary_id)
dns_ptr_add($session_id, $client_id, $params)
dns_ptr_update($session_id, $client_id, $primary_id, $params)
dns_ptr_delete($session_id, $primary_id)
dns_rp_get($session_id, $primary_id)
dns_rp_add($session_id, $client_id, $params)
dns_rp_update($session_id, $client_id, $primary_id, $params)
dns_rp_delete($session_id, $primary_id)
dns_srv_get($session_id, $primary_id)
dns_srv_add($session_id, $client_id, $params)
dns_srv_update($session_id, $client_id, $primary_id, $params)
dns_srv_delete($session_id, $primary_id)
dns_txt_get($session_id, $primary_id)
dns_txt_add($session_id, $client_id, $params)
dns_txt_update($session_id, $client_id, $primary_id, $params)
dns_txt_delete($session_id, $primary_id)
Code:
$username
$password
$soap_location
$soap_uri 
$session_id
$client_id 
$primary_id

$params["username"] => 
$params["password"]
$params["usertheme"]
$params["language"]
$params["server_id"]
$params["domain"]
$params["type"]
$params["parent_domain_id"]
$params["redirect_type"]
$params["redirect_path"]
$params["subdomain"]
$params["active"]
$params["source"]
$params["destination"]
$params["wb"]
$params["rid"]
$params["email"]
$params["priority"]
$params["company_name"]
$params["contact_name"]
$params["street"]
$params["zip"]
$params["city"]
$params["state"]
$params["country"]
$params["telephone"]
$params["mobile"]
$params["fax"]
$params["internet"]
$params["icq"]
$params["notes"]
$params["template_master"]
$params["template_additional"]
$params["default_mailserver"]
$params["limit_maildomain"]
$params["limit_mailbox"]
$params["limit_mailalias"]
$params["limit_mailforward"]
$params["limit_mailcatchall"]
$params["limit_mailrouting"]
$params["limit_mailfilter"]
$params["limit_fetchmail"]
$params["limit_mailquota"]
$params["limit_spamfilter_wblist"]
$params["limit_spamfilter_user"]
$params["limit_spamfilter_policy"]
$params["default_webserver"]
$params["limit_web_domain"]
$params["web_php_options"]
$params["limit_web_aliasdomain"]
$params["limit_web_subdomain"]
$params["limit_ftp_user"]
$params["limit_shell_user"]
$params["ssh_chroot"]
$params["default_dnsserver"]
$params["limit_dns_zone"]
$params["limit_dns_record"]
$params["limit_client"]
$params["default_dbserver"]
$params["limit_database"]
$params["limit_cron"]
$params["limit_cron_type"]
$params["limit_cron_frequency"]
$params["database_name"]
$params["database_user"]
$params["database_password"]
$params["database_charset"]
$params["remote_access"]
$params["remote_ips"]
$params["source_server"]
$params["source_username"]
$params["source_password"]
$params["source_delete"]
$params["pattern"]
$params["data"]
$params["action"]
$params["quota"]
$params["maildir"]
$params["homedir"]
$params["gid"]
$params["uid"]
$params["postfix"]
$params["disableimap"]
$params["disablepop3"]
$params["policy_name"]
$params["virus_lover"]
$params["spam_lover"]
$params["banned_files_lover"]
$params["bad_header_lover"]
$params["bypass_virus_checks"]
$params["bypass_banned_checks"]
$params["bypass_header_checks"]
$params["transport"]
$params["sort_order"]
$params["priority"]
$params["policy_id"]
$params["fullname"]
$params["access"]
$params["type"]
Salud!
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
The Following User Says Thank You to BorderAmigos For This Useful Post:
Mosquito (23rd July 2010)
Reply

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
Postfix delivery problem erebus Installation/Configuration 7 26th June 2014 14:33
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
post fix error after a year aberrio Server Operation 5 5th May 2009 21:33
ISPConfig 2.2.14 released till General 48 19th July 2007 23:46
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48


All times are GMT +2. The time now is 18:59.


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