Direct Web Remoting (DWR) and AJAX-based Plugin Development


I’'m developing a WF Plugin for Location Based Services (based on JEP-0080,

Now I’'m trying to publish these location informations stored as JavaBeans, in a AJAX client-side way with the use of DWR technology, instead of rough JavaScript and JSON or server-side services.

I noticed that DWR is used in WF to serialize JDate and Downloader classes yet, and that dwr.jar and dwr.xml DWR files are stored in custom plugin target path:



So I though that DWR was ‘‘ready’’ to use in my plugin context path (http://localhost:9090/plugins/location) and tried to add to dwr.xml my plugin beans to serializes like follows:

(follows dwr.xml WF code)

But when I try to get DWR test page:

http://localhost:9090/plugins/location/dwr I have no response, while in http://localhost:9090/dwr I have JDate and Downloader classes’’ test page.

I think the pb was plugin’'s class library path (org.jivesoftware.wildfire.plugin.location).

So how can I add DWR to my Web Application in a way to access DWR dynamically - generated Javascript from my Web App’'s context path (such as http://localhost:9090/plugins/location/dwr/interface/LocationTracker.js) ?



Now I’'m using DWR integrating my JavaBeans in WF srs like this:

org.jivesoftware.wildfire.location.LocationTracker // Location Tracker Class

org.jivesoftware.wildfire.location.LocationListener // Listener to updates from a DB

org.jivesoftware.wildfire.location.LocationHandler // the bean for Location Info

and dwr.xml modified as in previous post.

With this solution DWR was able to serialize the beans in associative arrays { } and publish JS mappers to


undeer WF Web App context path.

Obviosly that’'s not correct solution, since it involves WF srcs.

I think to use my JavaBeans as Jar library (under the same plugin’'s package), put them in /lib and try DWR again.


FWIW, I’'m trying to do something similar but have not yet figured out how to do it properly. =/