SOLVED : For future reference : The problem seemed to be in the APE version I was using. I had the 1.1.1 APE Server. I changed it to get the Git version on the APE Website [Version 1.1.0], and it works perfectly.
Thanks, Thothathri On Jul 11, 2:22 pm, Thothathri Srinivasan <[email protected]> wrote: > I'm trying to just register a new command, on the server side, I have > the following JS file that I have included in main.ape.js > : > Ape.registerCmd( "NEWCMD", false, function(params, info) { > Ape.log("Inside NEWCMD now"); > return {'raw':{'name': 'NEWRAW', 'data' :{'dof':'bsa'}}}; > > }); > > On the client html page, I have the following code : > > client.addEvent('multiPipeCreate', function(pipe, > options) { > > //3) Send the message on the pipe > > client.core.request.send('NEWCMD',{food : "eat"}); > > }); > > NEWCMD is my user defined new APE Server command. It gives me the > following error : [{"time":"1310418788","raw":"ERR","data":{"chl": > 3,"code":"001","value":"BAD_PARAMS"}}] as a response to the NEWCMD > command. > Its posting the NEWCMD request, but gets this error message in > response. I tried to find out if its getting into the newcmd.js file > by giving an Ape.log("something"), but seems like its not putting > anything on the log, so I'm guessing the command is not being found or > is getting a bad params response. > Any idea what could be wrong? > > Thanks, > Thothathri > On Jul 11, 10:22 am, Thothathri Srinivasan <[email protected]> > wrote: > > > Hi, > > > I'm trying to create a new command by using registerCmd, and I wanted > > to know how exactly to use another Cmd inside this. So what I have is > > like : > > registerCmd("NEWCMD",true,function(params,info) > > // Inside here I want to say use the SEND command, and > > then send a RAW as a response. I know I can send the RAW with a simple > > return. So, how do I use the SEND command here? > > > }); > > > Also, I wanted to know where I can see how the SEND command works, as > > I couldn't find the SEND command registered by the > > registerCmd("SEND" ..... ) anywhere. > > > Thanks, > > Thothathri -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
