简体   繁体   中英

Huge amount of time sending data with suds and proxy

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!!!

嗅探器输出(例如,wireshark的输出)可能有助于理解这一点。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM