I'm writing a Java server based on Apache Thrift, that will receive data from a Javascript client. I have completed the Java server, but the problem is that I can get a working example for the Javascript client (I was unable to find a good example for it). the examples in the build documentation aren't very helpful. My current Javascript client is below:
function testServer() {
try {
var transport = new Thrift.Transport("http://127.0.0.1:9090");
var protocol = new Thrift.Protocol(transport);
var client = new JavaEventClient(protocol);
var alive = client.isServerAlive();
} catch(e) {
}
}
testServer();
But the code isn't working - as the Java server throws an "Out Of Memory" Error. I don't know if the error is due to my client code or Apache Thrift.
What am I doing wrong?