2016/04/10 - Apache Wookie has been retired.

For more information, please explore the Attic.

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).

Wookie setup

Once deployed, you need to setup Wookie as follows:

Preference management

You can use Wookie to manage the preferences of your Gadgets; to do this you must replace the standard Shindig Features jar with one with some additional Wookie javascript code and make an adjustment to the web.xml for Wookie to allow calls between the two applications.

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.

In core.prefs:

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.)

Proxy configuration

Both Wookie and Shindig come with server-side proxy implementations. You can use either or both of these.

In each case you can set the proxy URL to either: