Thrift transport in javascript client -


i'm trying build javascript client thrift server. server , running , can calls server working php client. can't figure out javascript client.

in particular, instantiating transport baffles me. tutorial @ http://thrift.apache.org/tutorial/js/ shows:

function calc() {     var transport = new thrift.transport("/thrift/service/tutorial/");     var protocol  = new thrift.protocol(transport);     var client    = new calculatorclient(protocol); 

when this, http 404 on "/var/www/thrift/service/tutorial/"

i've found 1 or 2 other examples use

var transport = new thrift.transport("/service"); 

but gives me 404 well.

i've never seen explanation of i'm supposed pass constructor of transport in javascript. in php code, create socket , pass constructor of transport. however, javascript complains thrift.socket() isn't constructor.

the tutorial @ http://thrift.apache.org/tutorial/js/ isn't terribly helpful. says:

the first thing using thrift files setting transport protocol. @ time, supports ajax , follows:

var transport = new thrift.transport("/thrift/service/tutorial/"); 

there's no description of path passed constructor should be.

i'm lost on this. pass transport constructor in javascript?

the argument url website endpoint acts thrift server using http processor , json protocol. source code contains java test server example can work such client.

for own server, should able act webserver, , handle things cors cross-domain requests js client.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -