I'm trying to use jsonRpcService to print a value on console. Just for testing. But when i call the method i recieve this error on browser console:
POST http://localhost/Teste.nsf/Teste.xsp/RpcService?$$viewid=!ei0pdt23xx! 400 (Bad Request)
Error: Unable to load /Teste.nsf/Teste.xsp/RpcService?$$viewid=!ei0pdt23xx! status:400(…)
Unable to load /Teste.nsf/Teste.xsp/RpcService?$$viewid=!ei0pdt23xx! status:400
Error: Unable to load /Teste.nsf/Teste.xsp/RpcService?$$viewid=!ei0pdt23xx! status:400(…)
Error: Unable to load /Teste.nsf/Teste.xsp/RpcService?$$viewid=!ei0pdt23xx! status:400(…)
Here is the image of the error: https://i.stack.imgur.com/T5ekl.jpg
I already searched a lot for one solution to this error but i got nothing.
This is the code that i'm using:
<xe:jsonRpcService id="jsonRpcService1" serviceName="metodos"
pathInfo="RpcService">
<xe:this.methods>
<xe:remoteMethod name="teste" script="print('teste')"></xe:remoteMethod>
</xe:this.methods>
</xe:jsonRpcService>
And this is the code that i'm using on console to call the function
metodos.teste()
Does anyone knows what i'm doing wrong?
Thanks