Uncaught SoapFault exception regarding /nodeworx/dns/record/queryRecords

I have been seeing errors within apache logs regarding this particular API call.

[Mon Sep 16 12:25:18 2013] [error] [client xx.xx.xx.xx] PHP Fatal error:  Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getTemplateVars() on a non-object in /chroot/home/hidden/hidden/html/classes/interworx.php:67
Stack trace:
#0 /chroot/home/hidden/hidden/html/classes/interworx.php(67): SoapClient->__call('route', Array)
#1 /chroot/home/hidden/hidden/html/classes/interworx.php(67): SoapClient->route('-----BEGIN INTE...', '/nodeworx/dns/r...', 'queryRecords', Array)
#2 /chroot/home/hidden/hidden/html/setup/addStatus.php(241): iworx_queryDnsRecord('', 'hidden...', 'A', '', 0, 1)
#3 {main}
  thrown in /chroot/home/hidden/hidden/html/classes/interworx.php on line 67

Within interworx.php I have the following function on 67:

function iworx_queryDnsRecord($zone_id, $domain, $type, $last_update, $uni, $show_domain) {

	$api_controller = '/nodeworx/dns/record';
	$action			= 'queryRecords';
	$input			= array(
			'zone_id'		=> $zone_id,
			'domain'		=> $domain,
			'type'			=> $type,
			'last_update'	=> $last_update,
			'uni'			=> $uni,
			'show_domain'	=> $show_domain);
	$client = new SoapClient( iworxHost );
	$result = $client->route( iworxKey, $api_controller, $action, $input );
	return $result;
	
}

This seemed to work on 4.x but I noticed Interworx is now on v5.0.10, has the API changed? The online API documentation is still the same, thanks.

EDIT
I manually ran nodeworx command and got this from command line:

PHP Fatal error:  Call to a member function getTemplateVars() on a non-object in /usr/local/interworx/include/Payload/Factory/NW/Dns.php on line 127

Fatal error: Call to a member function getTemplateVars() on a non-object in /usr/local/interworx/include/Payload/Factory/NW/Dns.php on line 127

Inside /usr/local/interworx/var/log/api.log

2013-09-16 14:54:10.83359 [nosess-wmra-grg5-API] [INFO]  :  127.0.0.1 routing: Ctrl_SOAP -> index : /soap 
2013-09-16 14:54:10.86377 [muitjj-2qgp-vrnh-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecordsCommit : /soap 
2013-09-16 14:54:10.96839 [zfym7n-wmra-grg5-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecords : /soap 
2013-09-16 14:54:11.00357 [zfym7n-wmra-grg5-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecordsCommit : /soap 
2013-09-16 14:54:11.14834 [nosess-hd5e-5rg7-API] [INFO]  :  127.0.0.1 routing: Ctrl_SOAP -> index : /soap 
2013-09-16 14:54:11.24612 [wjszgm-hd5e-5rg7-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecords : /soap 
2013-09-16 14:54:11.27820 [wjszgm-hd5e-5rg7-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecordsCommit : /soap 
2013-09-16 14:54:16.62002 [nosess-0t4u-g63k-API] [INFO]  :  127.0.0.1 routing: Ctrl_SOAP -> index : /soap 
2013-09-16 14:54:16.71700 [dmfa6g-0t4u-g63k-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecords : /soap 
2013-09-16 14:54:16.75080 [dmfa6g-0t4u-g63k-API] [INFO]  :  127.0.0.1 routing: Ctrl_Nodeworx_DnsRecord -> queryRecordsCommit : /soap 

Inside /usr/local/interworx/var/log/error.log

[Mon Sep 16 14:56:10 2013] [info] Initial (No.1) HTTPS request received for child 3 (server hidden.hidden.com:2443)
[Mon Sep 16 14:56:10 2013] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function getTemplateVars() on a non-object in /usr/local/interworx/include/Payload/Factory/NW/Dns.php on line 127
[Mon Sep 16 14:56:10 2013] [info] [client 127.0.0.1] Connection closed to child 4 with standard shutdown (server hidden.hidden.com:2443)
[Mon Sep 16 14:56:10 2013] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function getTemplateVars() on a non-object in /usr/local/interworx/include/Payload/Factory/NW/Dns.php on line 127
[Mon Sep 16 14:56:10 2013] [info] [client 127.0.0.1] Connection closed to child 3 with standard shutdown (server hidden.hidden.com:2443)
[Mon Sep 16 14:56:10 2013] [info] [client 127.0.0.1] Connection to child 0 established (server hidden.hidden.com:2443)
[Mon Sep 16 14:56:10 2013] [info] Seeding PRNG with 136 bytes of entropy
[Mon Sep 16 14:56:10 2013] [info] Initial (No.1) HTTPS request received for child 0 (server hidden.hidden.com:2443)
[Mon Sep 16 14:56:11 2013] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function getTemplateVars() on a non-object in /usr/local/interworx/include/Payload/Factory/NW/Dns.php on line 127
[Mon Sep 16 14:56:11 2013] [info] [client 127.0.0.1] Connection closed to child 0 with standard shutdown (server hidden.hidden.com:2443)

Hi - thanks for reporting this, and I see you’ve opened a ticket as well. We’ll continue debugging from there, and post a followup when it’s resolved :slight_smile:

I don’t recall opening a ticket, perhaps its from my provider. Thank you for looking into this.

Remote Assistance is about to expire, any progress on this? Thanks.

Reproduce:
test.php

<?php 

include_once('../config/interworxKey.config');

function iworx_queryDnsRecord($zone_id, $domain, $type, $last_update, $uni, $show_domain) {

	$api_controller = '/nodeworx/dns/record';
	$action			= 'queryRecords';
	$input			= array(
			'zone_id'		=> $zone_id,
			'domain'		=> $domain,
			'type'			=> $type,
			'last_update'	=> $last_update,
			'uni'			=> $uni,
			'show_domain'	=> $show_domain);
	$client = new SoapClient( iworxHost );
	$result = $client->route( iworxKey, $api_controller, $action, $input );
	return $result;

}

var_dump(iworx_queryDnsRecord('', 'sub.domain.com', 'A', '', 0, 1));

?>

This will generate an error, if you put a ‘period’ before sub you will get this:

array(2) {
  ["status"]=>
  int(11)
  ["payload"]=>
  string(1692) "There was a problem validating the form. Please see details below.
domain: ".sub.domain.com" This is not a valid option
Usage: 
zone_id 
domain longlist|of|sub|domains|here
type A|CNAME|NS|MX|PTR|TXT|SOA|SPF|SRV|AAAA|NAPTR
last_update 
uni 1|0
show_domain 1|0
"
}

It seems to work now, not sure what happened, I’m hoping it’s something you guys did.

Hi Dragonmiller, it should be fixed now as of the latest version.