diff --git a/lib/wsdl.js b/lib/wsdl.js index 59a6dfd25..e9cbd228f 100644 --- a/lib/wsdl.js +++ b/lib/wsdl.js @@ -477,6 +477,10 @@ MessageElement.prototype.postProcess = function(definitions) { ns = nsName.namespace; var schema = definitions.schemas[definitions.xmlns[ns]]; this.element = schema.elements[nsName.name]; + if(!this.element) { + console.log(nsName.name + " is not present in wsdl and cannot be processed correctly."); + return; + } this.element.targetNSAlias = ns; this.element.targetNamespace = definitions.xmlns[ns];