Hi,

thanks for reporting this issue, I just fixed it in the current trunk (see
https://issues.apache.org/jira/browse/SHINDIG-1506).

The issue was, that the RPC servlet did not parse the given parameters
according to the spec (
http://opensocial-resources.googlecode.com/svn/spec/1.1/Core-API-Server.xml#urlAddressing)
and therefor were not accessible in the RpcRequestItem.

A correct, and now working, RPC call would be:

/social/rpc?method=people.get&id=req&params.userId=@me&params.groupId=@self

Can you verify this?

-- Bastian

2011/2/13 Wouter Charle <[email protected]>

> Hi all, I have a problem with doing RPC Requests to the social service.
> If I do a rest call like: http://shindig/social/rest/people/@me/@self
> I get: { "entry":{ "isOwner":false, "isViewer":true,
> "name":"anonymous_user", "displayName":"Guest" }
> Now, this should be reproducable with an RPC
> I call:
> http://shindig/social/rpc?method=people.get&userId=@me&groupId=@self
> But then I get: {"error":{"code":500,"message":"Internal error: Can't get
> viewerId from an anonymous token"}}
>
> I was wondering if other people also had this problem.
>
> I've traced this back in the code and found that in RpcRequestItem.php,
> line
> 38 to 42, the data field of the RpcRequestItem fails to be set correctly.
> The data field is set equal to $rpc['params'], which does never exist.
> Hence
> parameters are always lost in making an RPC...
> The quick and dirty solution to this problem is to replace lines 38 to 42
> in
> RpcRequestItem.php by $this->data = $rpc;
>
> Applying that solution does give me the correct output.
>
> Can anyone confirm this problem? What steps are needed to make sure this
> gets resolved in the Shindig trunk?
>
> Many thanks!
>

Reply via email to