Ichiro, e.a.,
More digging in json-rpc ...
I did some further investigation, trying to rewrite emitJSONCall to
something workable.
Apparently there are 2 types of rpc's, those that are registered via
registerGlobalObject(..) and those that are registered via
registerJSONObject(..)
registerGlobalObject
==> { method:"search.findPages", params:[...] }
registerJSONObject
==> { method:"RPCxxxxxxx.function", params:[...] }
For the second case, the "RPCxxxx" is generated at run-time, and bound to
the RPCCallable instance. So this is a number which continuously changes.
BTW, note that the "params" field has to be of type Array.
* * *
I've patched emitJSONCall(..) so that it now renders correct JSON RPC
invocation javascript.
=> No more error-code 591 -- message not found ;
As Ichiro rightly pointed out, the json-rpc methods are being properly
registered.
But -- another error is thrown instead ; by WikiJSONAccessor(..)
code: 490
msg: "No permission to access this AJAX method!"
trace: "org.apache.wiki.auth.WikiSecurityException: No permission to
access this AJAX method!
This error is thrown even when I'm logged in as an Administrator.
Anybody a clue why JSPWiki would refuse such ajax calls?
dirk
On Sat, Feb 15, 2014 at 3:09 PM, Ichiro Furusato
<[email protected]>wrote:
> Hi Harry,
>
> I can't honestly say. But I just added a printout of the list of objects in
> the global
> registry in the JSONRPCManager, and all of my registrations (of plugins as
> well
> as singleton application-level manager objects) are showing up in the
> c_globalObjects
> list. The problem seems to be related to the code that connects the JS call
> to that
> registry.
>
> Ichiro
>
> On Sun, Feb 16, 2014 at 2:12 AM, Harry Metske <[email protected]
> >wrote:
>
> > I am a complete novice in this area, but aren't you running in this same
> > situation as we did before:
> >
> >
> >
> https://issues.apache.org/jira/browse/JSPWIKI-659?focusedCommentId=13552522&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13552522
> >
> > kind regards,
> > Harry
> >
>