node-soap-server
node-soap-server copied to clipboard
Code in the example does not work - library throws an error
Code in the example does not work - library throws an error
.../node_modules/soap-server/lib/soap-server.js:35
var args = matches[1].split(',');
^
TypeError: Cannot read property '1' of null
at new SoapOperation (.../node_modules/soap-server/lib/soap-server.js:35:20)
at SoapService.addOperation (.../node_modules/soap-server/lib/soap-server.js:121:26)
at new SoapService (.../node_modules/soap-server/lib/soap-server.js:116:9)
at SoapServer.addService (.../node_modules/soap-server/lib/soap-server.js:154:24)
at Object.
This code is based on old and deprecated version of mediasoup, in the latest version you can do it much easier which makes this project irrelevant.
still got the same error, any solution?
I try solve this changing the pseudo class to a real class:
var soap = require('soap-server');
class Service {
test1(argv1, argv2) {
return `${argv1}${argv2}`;
}
}
var soapServer = new soap.SoapServer();
var soapService = soapServer.addService('testService', new Service());
soapServer.listen(3000, '127.0.0.1');
But does not show the functions.
Hi Yhojann,
When soap server parsers the operation from functions it expects a space between the function
keyword and the open bracket. It might work if write your function like this:
MyTestService.prototype.test1 = function (myArg1, myArg2){
return myArg1 + myArg2;
};
Hi Yhojann, This project is obsolete and uses old version of mediasoup. I suggest using latest example from the official documentation, they show how to use ffmpeg.