Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code in the example does not work - library throws an error #5

Open
akimkelar opened this issue Oct 29, 2019 · 5 comments
Open

Code in the example does not work - library throws an error #5

akimkelar opened this issue Oct 29, 2019 · 5 comments

Comments

@akimkelar
Copy link

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. (.../index.js:10:30)

@tan-tan-kanarek
Copy link
Owner

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.

@yhojann-cl
Copy link

still got the same error, any solution?

@yhojann-cl
Copy link

yhojann-cl commented May 21, 2022

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.

@hdvianna
Copy link

hdvianna commented Oct 9, 2022

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;
};

@tan-tan-kanarek
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants