I had the same problem when using the SUDS connection stub. I always got Exception: (404, u'Not Found') Everything else was fine tuned, so I just started to guess and try.
I do not know if certain SOAP servers called this or the fact that I need to set the location manually. The solution was to add the service name to the location URL. Therefore, you need to create several stubs for each individual service used, but it works:
servicename = "TestService" client = Client( url="foobar.wsdl", location = "http://soap.example.com/foobar/" + servicename , ) result = client[servicename]["TestServicePort"].TestServiceFunction() print(result)
This is not intended behavior, because SUDS should by itself (I think), but it was the only way to overcome this error. Maybe it was caused by the fact that I had to specify the Client.location attribute manually, and therefore SUDS does not change it anymore no matter what service I need to call.
Since it took me a while to find out, I'm sure it helps the poor guy: D
Regards, Michael
source share