Hi Chris, I tried the following URLs... returns JSON output. How to render the data as gadget??
In a html, I tried the following way... ------------- var specUrl0 = ' http://localhost:8181/social/rest/people/john.doe/@all?st=1001%3A1001%3A7810%3Ashindig%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml%3A0 '; function renderGadgets() { var gadget0 = gadgets.container.createGadget({specUrl: specUrl0}); gadgets.container.addGadget(gadget0); gadgets.container.layoutManager.setGadgetChromeIds( ['gadget-chrome-x']); gadgets.container.renderGadget(gadget0); }; </script> </head> <body onLoad="renderGadgets()" margin="0px"> <div id="gadget-chrome-x" class="gadgets-gadget-chrome"></div> </body> ------------ When I access the html from a browser.... it throes the following error on server. INFO: Failed to render gadget org.apache.shindig.gadgets.spec.SpecParserException: Malformed XML in file http: //localhost:8181/social/rest/people/john.doe/@all?st=1001%3A1001%3A7810%3Ashindi g%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialH elloWorld.xml%3A0: Content is not allowed in prolog. At: (1,1) at org.apache.shindig.gadgets.spec.GadgetSpec.<init>(GadgetSpec.java:165 ) at org.apache.shindig.gadgets.BasicGadgetSpecFactory.getGadgetSpec(Basic GadgetSpecFactory.java:85) at org.apache.shindig.gadgets.BasicGadgetSpecFactory.getGadgetSpec(Basic GadgetSpecFactory.java:58) at org.apache.shindig.gadgets.GadgetServer.processGadget(GadgetServer.ja va:83) at org.apache.shindig.gadgets.servlet.GadgetRenderingTask.process(Gadget --Suresh On Wed, Jul 30, 2008 at 6:13 AM, Christian Schalk <[EMAIL PROTECTED]>wrote: > Hello! > > In case you haven't had a chance to try out the new REST apis, you can > actually try them out very easily from a browser. Just fire up a local > version of Shindig and try this: > > See john.doe's people connections: > > http://localhost:8080/social/rest/people/john.doe/@all?st=john.doe%3Ajohn.doe%3A7810%3Ashindig%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml%3A0 > > > See john.doe's people connection in atom format: > > http://localhost:8080/social/rest/people/john.doe/@all?st=john.doe%3Ajohn.doe%3A7810%3Ashindig%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml%3A0&format=atom > > See jain.doe's people connections: > > http://localhost:8080/social/rest/people/jane.doe/@all?st=jane.doe%3Ajane.doe%3A7810%3Ashindig%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml%3A0 > > See jain.doe's activities: > > http://localhost:8080/social/rest/activities/jane.doe/@all?st=jane.doe%3Ajane.doe%3A7810%3Ashindig%3Ahttp%253A//localhost%253A8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml%3A0 > > You'll notice that a security token, "st" is required. In these examples I > just added the one that got generated from the samplecontainer. Once the > OAuth support is finished this won't be required - it will be up to the > container to implement their own security policy. > > (By the way, this was done with the Java version of Shindig. I didn't try > the PHP version yet.) > -Chris > > -- > Chris Schalk, Google Developer Advocate > -- --SR --------- Suresh Reddy K

