Found out that it works if I specify Request URL: http://shindig/social/rpc/?<http://shindig/social/rpc/?id=1&method=people.get¶ms.userId=1¶ms.groupId=@self> <http://shindig/social/rpc/?id=1&method=people.get¶ms.userId=1¶ms.groupId=@self>And add data in JSON format. Works very well :)
On Sat, Feb 26, 2011 at 3:09 PM, Wouter Charle <[email protected]>wrote: > Hi, I've setup Shindig using the PHP version and tried to do an RPC request > following the opensocial specifications (with content-type and > authentication set in the request header). I get the following errors: > > //------------------------------------------------------ > Fatal error: Uncaught exception 'InvalidArgumentException' with message > 'Malformed json string' in > /var/www/shindig/php/src/social/servlet/JsonRpcServlet.php on line 134 > InvalidArgumentException: Malformed json string in > /var/www/shindig/php/src/social/servlet/JsonRpcServlet.php on line 134 > Call Stack: > 0.0005 366444 1. {main}() /var/www/shindig/php/index.php:0 > 0.0541 1570652 2. JsonRpcServlet->doPost() > /var/www/shindig/php/index.php:118 > //------------------------------------------------------ > > I went through the code and found that in JsonRpcServlet.php ln 130, > the $requestParam is not set correclty. It should be filled with the > $GLOBALS['HTTP_RAW_POST_DATA']. These globals are set, but contain nothing, > which I assume is wrong. > Is this a bug, or me doing something wrong? Many thanks! > > The RPC request information is given below: > > //------------------------------------------------------ > > 1. Request URL: > > > http://shindig/social/rpc/?id=1&method=people.get¶ms.userId=1¶ms.groupId=@self > 2. Request Method: > POST > 3. Status Code: > 200 OK > 4. Request Headers > 1. Accept: > */* > 2. Accept-Charset: > ISO-8859-1,utf-8;q=0.7,*;q=0.3 > 3. Accept-Encoding: > gzip,deflate,sdch > 4. Accept-Language: > nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4 > 5. Authorization: > hh5s93j4hdidpola > 6. Cache-Control: > max-age=0 > 7. Connection: > keep-alive > 8. Content-Length: > 0 > 9. Content-Type: > application/json > 10. Host: > shindig > 11. Origin: > http://localhost > 12. Referer: > http://localhost/test.html > 13. User-Agent: > Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, > like Gecko) Ubuntu/10.10 Chromium/9.0.597.84 Chrome/9.0.597.84 > Safari/534.13 > 5. Query String Parameters > 1. id: > 1 > 2. method: > people.get > 3. params.userId: > 1 > 4. params.groupId: > @self > 6. Response Headers > 1. Access-Control-Allow-Headers: > Authorization, Content-Type > 2. Access-Control-Allow-Origin: > * > 3. Connection: > Keep-Alive > 4. Content-Encoding: > gzip > 5. Content-Length: > 251 > 6. Content-Type: > text/html > 7. Date: > Sat, 26 Feb 2011 14:04:02 GMT > 8. Keep-Alive: > timeout=15, max=100 > 9. Server: > Apache/2.2.16 (Ubuntu) > 10. Vary: > Accept-Encoding > 11. X-Powered-By: > PHP/5.3.3-1ubuntu9.3 > 7. //------------------------------------------------------ > >
