Excerpts from eoc's message of Thu Jan 21 16:34:12 -0300 2010: > Hello- > > This is probably a dumb question for folks who know what they are > doing, so please bear with me. I'm in the process of designing an app > that is essentially a 'bridge' application. In other words, if an > action is called within my app, within that action I need to be able > to communicate with one or more external web services, process the > results, and then return the processed results as the response. > > So, if you don't mind me asking, what is the best way of doing this? > It seems that the WebOb request and response objects are incredibly > powerful but must be used within a WSGI context (perhaps I am wrong on > this?) How would I initiate a request to an external service that > isn't wsgi if I were able to use Request/Response? > > Or is this a situation where I would use a different approach for > external communications, such as httplib2, within the action? >
I would say you could call a capable library to handle the web service from within your controller once you know what your user needs. For example if you require to communicate with a soap ws, you could use ZSI[1] or suds[2], parse the result and return it to your client. You have other libraries to talk to rpcxml [3] or RESTful. If the whole communicate, retrieve, parse process from the ws will take a lot of time, you could do it asynchronously and let the user know where and when he can check back to see the result. Hope this helps, Mariano [1] http://pywebsvcs.sourceforge.net/ [2] https://fedorahosted.org/suds/ [3] http://docs.python.org/library/xmlrpclib.html
-- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
