PDA

View Full Version : API queryZones problem after update to 4.8.0


dss
08-02-2011, 06:40 AM
Hi,

After updating to 4.8.0. the queryZones API action is not working well. When it prints the $result['payload'] value, it gives back an empty array and to the $result['status'] gives a 0. I'm attaching my code which I have been able to use without any fail.




$action = 'queryZones';
$api_controller = '/nodeworx/dns/zone';
$input = array('domain' => $domain);
$params = array( 'apikey' => $key, 'ctrl_name' => $api_controller, 'action' => $action);
$client = new SoapClient( 'https://'.$api_domain.':2443/soap?wsdl' );
$result = $client->route( $key, $api_controller, $action, $input);

// Only to test

print_r($result['payload']); //print only Array ( )

//Default output
foreach($result['payload'] as $result)
{
echo $result->zone_id;
}

What can be the problem?

Sincerely,
Adam

IWorx-Dan
08-10-2011, 12:41 PM
Hi Adam,

This is likely a bug - I'll forward to a developer to get this looked at.

dss
08-10-2011, 01:57 PM
Thank You!

standus
08-15-2011, 01:53 PM
I am testing Soap now and I have problems too:
$api_controller = '/nodeworx/siteworx';
$action = 'listMasterDomains';
$input = array();
$params = array( 'apikey' => $key,
'ctrl_name' => $api_controller,
'action' => $action,
'input' => $input );
or:
'/nodeworx/users'
listUsers

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://myhost:2443/soap?wsdl' : failed to load external entity "https://myhost:2443/soap?wsdl"
...
SoapClient->SoapClient('https://myhost...') #1 {main} thrown

Same error with API KEY access or main nodeworx account.
My Interworx is 4.8.1 last version.