OMG. Then I'm screwed? Is there anyway for Web2py to keep state info
alive? Geez, I must be missing something. Do no web services keep
state info? Are all web services stateless?

Eek!


On Aug 11, 4:06 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> You cannot use sessions with xmlrpc because the xmlrpc protocol does
> not use cookies to maintain persistence.
>
> On Aug 11, 5:02 pm, rb <rbspg...@gmail.com> wrote:
>
> > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > maintain data in the session global variable but it doesn't seem to
> > hold it. For example I first start by creating a document-form (tree
> > of datatables), cached in a data structure, as an attribute of
> > session. Here's the code:
>
> > from gluon.tools import Service
>
> > service = Service(globals())
>
> > def call():
> >     return service()
>
> > @service.xmlrpc
> > def xrBeginDocFrm( frmName):
> >     ''' create table records and push xrInitRecord down to all tables.
> > '''
> >     if session.frmz == None:
> >         session.frmz = {}
> >     if not session.frmz.has_key("frmName"):
> >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > Then later I call the svr to get the table column definitions:
>
> > @service.xmlrpc
> > def xrGetColDefs(frmName, tblInstName):
> >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> >     return tblInst.GetColDefs()
>
> > but I find that session does not have a frmz attribute. I can walk the
> > debuger through the svr code so I can see that the functions are
> > getting called, but when I inspect session it contains nothing.
>
> > I thought sessions stick around forever? I thought that session was
> > the place to keep my own attributes that will live on (between xmlrpc
> > calls).
>
> > Heeeeelp!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to