diff --git a/lib/wsdl.js b/lib/wsdl.js
index e3d170bcc..5db76f8cb 100644
--- a/lib/wsdl.js
+++ b/lib/wsdl.js
@@ -1325,7 +1325,9 @@ WSDL.prototype.xmlToObject = function(xml, callback) {
for(attributeName in elementAttributes){
var res = splitQName(attributeName);
- if (res.name === 'nil' && xmlns[res.prefix] === 'http://www.w3.org/2001/XMLSchema-instance') {
+ if (res.name === 'nil' && xmlns[res.prefix] === 'http://www.w3.org/2001/XMLSchema-instance' && elementAttributes[attributeName] &&
+ (elementAttributes[attributeName].toLowerCase() === 'true' || elementAttributes[attributeName] === '1')
+ ) {
hasNilAttribute = true;
break;
}
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/common.xsd b/test/request-response-samples/Dummy__should_handle_nil_false/common.xsd
new file mode 100644
index 000000000..e04c0710b
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/common.xsd
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/name.xsd b/test/request-response-samples/Dummy__should_handle_nil_false/name.xsd
new file mode 100644
index 000000000..a515b88c3
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/name.xsd
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/request.json b/test/request-response-samples/Dummy__should_handle_nil_false/request.json
new file mode 100644
index 000000000..52d6f57f7
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/request.json
@@ -0,0 +1,6 @@
+{
+ "DummyField1": "Humpty",
+ "DummyFilter": {
+ "DummyStringFilter": "Dumpty"
+ }
+}
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/request.xml b/test/request-response-samples/Dummy__should_handle_nil_false/request.xml
new file mode 100644
index 000000000..b4ceed77f
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/request.xml
@@ -0,0 +1 @@
+HumptyDumpty
\ No newline at end of file
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/response.json b/test/request-response-samples/Dummy__should_handle_nil_false/response.json
new file mode 100644
index 000000000..f680181d2
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/response.json
@@ -0,0 +1,12 @@
+{
+ "DummyResult": {
+ "DummyList": {
+ "DummyElement": {
+ "attributes": {
+ "xsi:nil": "false"
+ },
+ "$value":"Dummy Element Entry"
+ }
+ }
+ }
+}
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/response.xml b/test/request-response-samples/Dummy__should_handle_nil_false/response.xml
new file mode 100644
index 000000000..d60ee3c43
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/response.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+ Dummy Element Entry
+
+
+
+
+
+
diff --git a/test/request-response-samples/Dummy__should_handle_nil_false/soap.wsdl b/test/request-response-samples/Dummy__should_handle_nil_false/soap.wsdl
new file mode 100644
index 000000000..814ba1bf5
--- /dev/null
+++ b/test/request-response-samples/Dummy__should_handle_nil_false/soap.wsdl
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+