I have spent many many hours trying to resolve the issue with the following code to no avail:
// Main initiator for SOAP client to web service
soap.createClient(url, function (err, client) {
client.addSoapHeader(soapHeader); // Adds the <AccessToken><TokenValue> to header.
client.GetInfo(args, function (err, result) { // call SOAP service for parent information
console.log(prettyjson.render(result)); // logs information from parent via result as expected
serviceId = result[0].serviceID;
client.GetChildInfo(serviceId, function (err, result) { // Nested call to SOAP service with callback to get the child record associated to parent (Surely this is not too deep)
console.log(prettyjson.render(result)); // This line throws the range error.
});
});
});
I am using the module soap obtained via "npm install soap"
I cannot understand why this error is being thrown. I have searched the web high and low but have had to admit defeat and now seek assistance.
Am I doing something fundamentally wrong?
I am new to node.js and slowly wrapping my head arounf the none blocking event driven architecture. Slowly being the operative word given
my apparent difficulty with what seems a simple block of code above.
Any help greatfully appreciated.