Category Archives: APS1.0

How to get a mainservice fields value into the subservice?

Direct method its not possible. but you can use value-of-settings. For Example: Mainservice contains a field with id ‘firstname’. using the below statement you can get the value into the configuration script of mainservice but you cannot get into the subservice configuration script. $firstname=trim(getenv(“SETTINGS_firstname”)); use the value of settings in subservice field as below </setting>… Read More »

Domain list or a dropdown box for a domain in Subservice of APS package

we can do this using value of settings. # create domain list box in subservice using the following <setting type=”list” id=”domain” element-type=”domain-name”> <name>domain name</name> </setting> # in subservice again create a hidden field with type “list” as below. here use the value of settings <setting type=”list” id=”subdomain” element-type=”string” value-of-setting=”domain” protected=”true” visibility=”hidden”> <name>Subdomain list</name> </setting> #… Read More »

Domain name dropdown-list bx in subservice of the aps package

$xml = ‘<methodCall> <methodName>pem.getDomainList</methodName> <params> <param> <value> <struct> <member> <name>subscription_id</name> <value> <int>’.$subscriptionid.'</int> </value> </member> </struct> </value> </param> </params> </methodCall> ‘; you can use the following url for this. ‘http://’ . HOST . ‘:’ . PORT . ‘/’ . PATH;

How to limit the subservice creation in APS package?

In an APS package with one mainservice and one subservice. For example:Main service will fetch some basic credentials and subservice will create an account in the isp(using API). We can restrict this account creation using limit,means admin can limit the subservice-create account in the customer control panel. For implementing this we can use the following… Read More »

Rest API call using curl always throwing error in PA server? properly working in local server.

Below error getting in  PA Server. Execution of configuration script for instance with id 5767 of service with id Create Account of instance with id 3654 of application with id 4199 failed – returned value: ‘ errors: ‘* About to connect() to 198.–.–.– port 8080 * Trying 198.–.–.–… * connected * Connected to 198.–.–.– (198.–.–.–)… Read More »

Error Displaying in APS Package or validating an entered field

Sample code $str = “<?xml version=’1.0′ encoding=’UTF-8′?>”; $str.= ‘<output xmlns=”http://apstandard.com/ns/1/configure-output”><settings>’; $errorMessages=”mydoubts.in already exists”; $errsetting=’domainname’; $str .= ‘<errors>’; $str .= ‘<error id=”‘.$errsetting.’” setting-id=”‘.$errsetting.’”>’; $str .= ‘<message>’.$errorMessages.'</message><system>’.$errorMessages.'</system></error>’; $str .= ‘</errors>’; $str .= ‘</settings>’; echo $str;

Storing a value into the settings variable in aps package.

Below sample code will execute through verification script will work sample code to load a country dropdownbox. $str = “<?xml version=’1.0′ encoding=’UTF-8′?>”; $str .= ‘<output xmlns=”http://apstandard.com/ns/1/configure-output”><settings><setting id=”country”>’; foreach () { $str .=    ‘<choice id=”‘.$id.’”><name>’.htmlspecialchars($cname).'</name></choice>’; } $str .= ‘</setting></settings>’; echo $str;