Huge amount of time sending data with suds and proxy

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2009-12-17T15:31:24Z Indexed on 2010/05/14 22:04 UTC
Read the original article Hit count: 265

Filed under:
|
|

Hi everyone,

I have the following code to send data through a proxy using suds:

 import suds
 t = suds.transport.http.HttpTransport()
 proxy = urllib2.ProxyHandler({'http': 'http://192.168.3.217:3128'})
 opener = urllib2.build_opener(proxy)
 t.urlopener = opener
 ws = suds.client.Client('http://xxxxxxx/web.asmx?WSDL', transport=t)
 req = ws.factory.create('ActionRequest.request')
 req.SerialNumber = 'asdf'
 req.HostName = 'hola'
 res = ws.service.ActionRequest(req)

I don't know why, but it can be sending data above 2 or 3 minutes, or even more and it raises a "Gateway timeout" exception sometimes. If I don't use the proxy, the amount of time used is above 2 seconds or less. Here is the SOAP reply:

(ActionResponse){
   Id = None
   Action = "Action.None"
   Objects = ""
 }

The proxy is running right with other requests through urllib2, or using normal web browsers like firefox.

Does anyone have any idea what's happening here with suds?

Thanks a lot in advance!!!

© Stack Overflow or respective owner

Related posts about suds

Related posts about proxy