Is there any method to call the Scala function from PHP other than the Thrift service? I initially tried the Thrift service, but the problem is that it works several times, and sometimes not. Is there an easy solution to this problem?
The code below is my server.scala program
try { val serverTransport: TServerSocket= new TServerSocket(9778) val processor = new User_nodeService.Processor(User_node) val args1:Args = new Args(serverTransport) args1.processor(processor) val server:TServer = new TThreadPoolServer(args1) println("Started service successfully...") server.serve() }
Sometimes I get this error " value processor is not a member of org.apache.thrift.server.TThreadPoolServer.Args " in the line " args1.processor(processor) ", and sometimes the code works fine.
source share