On Thu, Sep 28, 2006 at 10:42:18PM +1000, [EMAIL PROTECTED] wrote:
> I've inherited a project that now needs to post an XML
> packet to an ecommerce gateway, ie a user submits, via
> a form, credit card details which are posted to a Zope
> server. The Zope server then builds an XML packet and
> wants to POST to an external server which will send a
> Can I capture that RESPONSE in Zope or must I use external
> methods and something like Python's httplib.
> I've done similar things with curl lib and C++, php curl
> lib and php.
> Any hints folks?

You'll need to use an external method (or write a simple product).
Then you can use httplib or urllib2, or the python wrappers for curl
(I found curl worked in some weird firewall configurations
that httplib didn't).

But you mention XML. If the remote system is XML-RPC, you'll
want to use python's excellent xmlrpclib, which makes
rpc calls look just like local calls:

remote = xmlrpclib.ServerProxy('http://somewhere/something')
result = remote.someMethod('param1', 'param2')


Paul Winkler
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to