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

Hi,

I’'m developing a WF Plugin for Location Based Services (based on JEP-0080, http://www.jivesoftware.org/community/thread.jspa?threadID=20993&tstart=350)

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:

target/plugins-dev/$MyPlugin/target/web/WEB-INF/dwr.xml

target/plugins-dev/$MyPlugin/target/web/WEB-INF/lib/dwr.jar

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

Thanks,

Loreto

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

http://localhost:9090/dwr/interface/LocationTracker.js

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.

LP

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