(SM) Support Tip: How to fix Error "TypeError: result.funcObj has no properties at char 1"

When converting WSDL to JS, the following errors may occur:

Process panel execute.js in RAD run.wsdl2js encountered error in line 1 (run.wsdl2js,execute.js)
Cannot evaluate expression (run.wsdl2js,execute.js)
Cannot evaluate expression (run.wsdl2js,execute.js)
Bad arg(2) oper = (run.wsdl2js,execute.js)
Cannot evaluate expression (run.wsdl2js,execute.js)
Script 'SOAP'  line 3421: ERROR TypeError: result.funcObj has no properties at char 1
Unrecoverable error in application:  soa.wsdl2js on panel execute.js
 
From above errors, the line number may change because .
Around lines 3400 and 3500 in the SOAP Script Library, there are some ELSE IF statements that contains "if ( elemName == " some of them have an additional validation (&& result.funcObj != undefined) and some of them doesn’t.

Add the extra validation in the IF statement above the line referenced in the error. For example:

Change the line 3419 in the SOAP Script Library from:
  if ( elemName == "restriction" )
 
To:
  if ( elemName == "restriction" && result.funcObj != undefined )

This change will permit the WSDL to be converted to JS.

Tags: