Yes, I'm using services currently. My question is how do I return xml generated by a template THROUGH a service. Sorry if I'm unclear or out in left field. I'm still a beginner. The idea is something like this:
@service.amfrpc3('domain') def somefunction(param): return dict(items = db(db.items.param == param).select()) #this would return xml generated by associated template #template for somefunction would look something like: <itemlist> {{for item in items}} <item attr = {{=item.attr}}> <child>{{=item.child}}</child> </item> </itemlist> On Jan 29, 7:11 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > Did you look into web2py services? > > @service.amfrpc3('domain') > def somefunction(a,b,c): > return a+b+c > > On Jan 29, 5:44 pm, Dane <dane.schnei...@gmail.com> wrote: > > > Hello, > > > I'm building a web2py backend for a Flex site, and I would like to > > send some of my data as XML since it's hierarchical in nature and AS3 > > has great xml manipulation capabilities with e4x. However, I'd like to > > send this data through an exposed amf function instead of through REST > > for speed, security, and uniformity across my services. PyAMF has no > > problem with XML, and I know I could use a tool like ElementTree to > > build my xml right in the exposed function, but I'd rather use the > > Web2py templating system. Any ideas on how I'd go about sending XML > > generated through a template to Flex through an amf function? Thanks! > > > -Dane > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.