tags:

views:

158

answers:

1

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

A: 

A sniffer output (e.g. from wireshark) could be very helpful to understand this one.

Ofir