I have a SOAP request that is known to work using a tool like, say, SoapUI, but I am trying to get it to work using urllib.
This is what I have tried so far and it did not work:
import urllib f = ''.join(open('ws_request_that_works_in_soapui', 'r').readlines()) urllib.urlopen('http://url.com/to/Router?wsdl', f)
I haven’t been able to find the spec on how the document should be posted to the SOAP Server.
urllib is not a necessary requirement.
Short answer: yes you can.
Long answer:
Take a look at this example it doesn’t use urllib but will give you the idea of how to prepare SOAP request.
As far as urllib, I suggest using urllib2, and yes you can submit a SOAP request using it, follow the same steps to prepare the request as in previous example.