As well as serving W3C Widgets, Wookie can also be used to share OpenSocial gadgets by integrating with Apache Shindig. There are currently some limitations on this approach - for example, while Wookie quite happily handles preferences for OpenSocial gadgets, it doesn't handle the various services like friends lists that a full Shindig implementation supports, and you'd still need to integrate those yourself using Shindig's API. However you may still find it useful to deploy Wookie and Shindig in this manner.
How to setup Wookie with Shindig¶
To deploy Wookie with Shindig, you need to deploy the Shindig.war on your server alongside Wookie.
You can either place the Shindig webapp as ROOT or at another webapp location. (If deploying elsewhere, note you need to change a number of settings in Shindig; see the Shindig documentation for more details).
Once deployed, you need to setup Wookie as follows:
widget.metadata.urlto point to the Shindig metadata service (if you've set up Shindig at Root, this is already set)
trueto start sending Shindig security tokens with rendered widgets/gadgets.
The files in the folders
/features/core.prefs replace the Shindig preference handling stubs with an interface to the widget.preferences HTML 5 object implemented in Wookie.
- prefs.js has been altered to make the W3C Widget calls features.xml
- includes links to the wookie core JS injected code.
Note that these are absolute URLs are should be replaced with URLs to your own Wookie server
Edit the URLs in
features.xml, and then replace or merge these files with the standard Shindig features files to add W3C widget persistence. A ready-built shindig-features jar is located in the
http://svn.apache.org/viewvc/incubator/wookie/trunk/shindig/dist/ folder which you can use as the basis for your own shindig-features.jar file.
To enable this functionality to work it is currently necessary to turn off cross-site session security for DWR, or you will get a "Session Error" whenever using Gadgets with Wookie as the two webapps do not share sessions.
To do this, add the following parameter in web.xml for the dwr-invoker serlvet:
<init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param>
(You can also avoid this problem by merging the Wookie and Shindig applications into a single webapp, combining the web.xml files into one.)
Both Wookie and Shindig come with server-side proxy implementations. You can use either or both of these.
- The setting for Wookie can be found in
- The setting for Shindig can be found in [
In each case you can set the proxy URL to either: