How does it work for a service?

This is how I call the method: 
http://127.0.0.1:8000/videotag/default/call/xml/function/arg

This doesn't render using generic.xml (I tried modifying it). Any
ideas?

On Oct 15, 12:51 pm, Thadeus Burgess <[email protected]> wrote:
> Doesn't the view get rendered to a generic.xml? You should be able to use a
> custom view for the controller to render the xml exactly how you want it.
>
> -Thadeus
>
> On Thu, Oct 15, 2009 at 1:55 AM, Adi <[email protected]> wrote:
>
> > Hi,
>
> > I have an HTTPService which returns a result of a query as xml, which
> > I need to display in Flex 3 frontend.
>
> > Here's the simplified code snippet:
>
> > @service.xml
> > def records():
> >    rows = db().select(db.videodata.id, db.videodata.title,
> > db.videodata.thumbnail, \
> >                                            db.videodata.flvcopy,
> > db.videodata.description)
> >    return rows
>
> > When I call this service, the results look like this:
>
> > <item><id>1</id><title>Test Video</title><flvcopy></
> > flvcopy><thumbnail>videodata.thumbnail.
> > 9c41e14b670ddbd2.61616a74616b315f312e6a7067.jpg</
> > thumbnail><description>This is the description of a test video</
> > description></item><item><id>2</id><title>Another File</
> > title><flvcopy></flvcopy><thumbnail>videodata.thumbnail.
> > 9ef97a75a1aed552.6261636b626c75652e676966.gif</
> > thumbnail><description>This is a second record for testing</
> > description></item>
>
> > Basically there is no "root" element, just query results in every
> > <item></item> tag. This is resulting in parsing error. How can I
> > return the results of the query in a well-formed xml?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to