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

**URL:** <https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372>\
**Category:** InterWorx API Discussion\
**Created:** [September 16, 2013, 9:29am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372 "2013-09-16T09:29:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![afrazee](https://forums.interworx.com/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@afrazee](https://forums.interworx.com/u/afrazee)\
**Post date:** [September 16, 2013, 9:29am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/1 "2013-09-16T09:29:36Z")

</div>

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

```auto
[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:

```auto
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:

```auto
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

```auto
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

```auto
[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)

```

---

<div class="post-metadata">

**Author:** ![Paul](https://forums.interworx.com/user_avatar/forums.interworx.com/paul/32/6_2.png) [@Paul](https://forums.interworx.com/u/Paul)\
**Post date:** [September 16, 2013, 9:31pm UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/2 "2013-09-16T21:31:55Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![afrazee](https://forums.interworx.com/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@afrazee](https://forums.interworx.com/u/afrazee)\
**Post date:** [September 17, 2013, 6:30am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/3 "2013-09-17T06:30:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![afrazee](https://forums.interworx.com/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@afrazee](https://forums.interworx.com/u/afrazee)\
**Post date:** [September 18, 2013, 6:36am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/4 "2013-09-18T06:36:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![afrazee](https://forums.interworx.com/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@afrazee](https://forums.interworx.com/u/afrazee)\
**Post date:** [September 18, 2013, 7:03am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/5 "2013-09-18T07:03:10Z")

</div>

Reproduce:  
test.php

```auto
<?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:

```auto
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
"
}

```

---

<div class="post-metadata">

**Author:** ![afrazee](https://forums.interworx.com/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@afrazee](https://forums.interworx.com/u/afrazee)\
**Post date:** [September 18, 2013, 9:02am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/6 "2013-09-18T09:02:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![IWorx-Matt](https://forums.interworx.com/user_avatar/forums.interworx.com/iworx-matt/32/14_2.png) [@IWorx-Matt](https://forums.interworx.com/u/IWorx-Matt)\
**Post date:** [September 23, 2013, 8:53am UTC](https://forums.interworx.com/t/uncaught-soapfault-exception-regarding-nodeworx-dns-record-queryrecords/13372/7 "2013-09-23T08:53:51Z")

</div>

> [@Dragonmiller;22941](#):
>
> What is the status guys…?Any update on it…?

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