[Soap-Python] Soaplib serializing sqlalchemy after disconnect

Jonathan Endersby arbitraryuser at gmail.com
Tue Sep 28 08:35:14 CEST 2010


Hi

This is a bit of a stab in the dark but I'm hoping that someone has
run into this problem too and has a suggestion on how best to handle
it.

Using soaplib, I have a @soapmethod decorated method (this is the pypi
release version of soaplib). Using SQLAlchemy I do a whole bunch of
work and return some records to  arrays in the response message. I
then explicitly close my SA db connection and return, at which point
the decorator does all the serialization magic.

But, I get a "InvalidRequestError: This Connection is closed" error thrown...

I suspect that the objects that are ending up in the serializer are
lazy loaded and require the connection to be open in order to be
serialized... but I _need_ to explicitly close my connection.

Does anyone have any ideas on how to solve this? (I could be doing
something totally idiotic, so feel free to question the basics)

thanks,
j.

-- 
Jonathan Endersby

Connect. Share. Trust.
www.trustfabric.com  +27 82 414 3129 www.arbitraryuser.com
tfid: arbitraryuser
You have brains in your head. You have feet in your shoes. You can
steer yourself any direction you choose.  - Dr Seuss



More information about the Soap mailing list