Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-08 Thread Jane Wayne
1. looks interesting. could you show an example or do you have one illustrating how to write JSON back? 2. i'm not sure what to do with the online app? On Fri, Oct 5, 2012 at 12:45 PM, Frans Thamura wrote: > hi all esp jane > > let me summarize all our work here. > > 1. S2 REST Plugins > > we mo

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Frans Thamura
hi all esp jane let me summarize all our work here. 1. S2 REST Plugins we modify the default S2 REST Plugin, so we dont need SMD anymore, just use @Action and @Resut with type, and you can get full REST , PUT, GET, DELETE, POST. @Action(name = "/list", method = HttpMethod.GET) -> for REST GET

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Frans Thamura
jane the way our rest model is not using smd which you can get in s2 default rest plugins please visit our s2restplugins.java.net may be this plugins and small wiki can explain more. the category has extended from default persistanc. you must see the spring injection that handle this Frans Tha

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Frans Thamura
may be for full rest showcase you can checkout from our svn in yama.java.net full crud, bootstrap and spring hibernate. coee of our nurdoo.org you can take alook our rest security implementation also there feedback welcome for all Frans Thamura Meruvian On Oct 5, 2012 9:03 PM, "Jane Wayne" wr

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Jane Wayne
frans, i'm looking at http://java.net/projects/nurdoo/sources/nurdoo-web-svn/content/trunk/src/main/java/org/nurdoo/prayers/actions/CategoryAction.java?rev=3. could you please point me specifically to how you guys output JSON/XML back to the client? let me see if i got this right. you guys use

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Jane Wayne
yes, somewhat (not xml, but json). i modified the rest showcase. in particular, i modified, orders-editNew.jsp. i modified the form the look like this: the original line was: i believe the place to return XML/JSON is in the method create(). // POST /orders public HttpHeaders create()

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Frans Thamura
we now use mostly @action and @result as struts.xml replacement. Frans Thamura Meruvian On Oct 5, 2012 7:25 PM, "Lukasz Lenart" wrote: > 2012/10/5 Frans Thamura : > > hi jane > > > > all our apps using s2 with rest and json. > > > > see our example.at www.nurdoo.org > > Yep, exactly, try urls li

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Lukasz Lenart
2012/10/5 Frans Thamura : > hi jane > > all our apps using s2 with rest and json. > > see our example.at www.nurdoo.org Yep, exactly, try urls like below http://www.nurdoo.org/module/prayers http://www.nurdoo.org/module/prayers.json http://www.nurdoo.org/module/prayers.xml Regards -- Łukasz +

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Lukasz Lenart
2012/10/5 Jane Wayne : > not really/entirely what i'm looking for. the struts2-json-plugin > supports json. but what about xml? i need the flexibility to alter > between the two for the client/consumer of the rest services. Did you try to add .xml suffix to request action ? Regards -- Łukasz +

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Frans Thamura
hi jane all our apps using s2 with rest and json. see our example.at www.nurdoo.org source in nurdoo.java.net Frans Thamura Meruvian On Oct 5, 2012 7:11 PM, "Jane Wayne" wrote: > not really/entirely what i'm looking for. the struts2-json-plugin > supports json. but what about xml? i need the

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-05 Thread Jane Wayne
not really/entirely what i'm looking for. the struts2-json-plugin supports json. but what about xml? i need the flexibility to alter between the two for the client/consumer of the rest services. On Thu, Oct 4, 2012 at 7:41 PM, Ken McWilliams wrote: > I'm not familiar with this application but sim

Re: how to write json/xml output using struts 2 and rest + convention plugin

2012-10-04 Thread Ken McWilliams
I'm not familiar with this application but simply look at the documentation for the struts2-json-plugin, you can specify a json result and you can specify include and exclude parameters (so you just return the part(s) of your Action you want). In this way you could define a new map, put a key of "r