The Headers post fine but the associated XML seems to be taken as string data only, XML is not processed. XML string is of the form:
params = '''<?xml version="1.0" encoding"="UTF-8 "?>
<MainRequest>
<requestEnvelope><errorLanguage>en_US</errorLanguage>
</requestEnvelope></MainRequest>'''
The POST is of the form:
enc_params = urllib.quote(params)
request = urllib2.Request("https://myURL/",enc_params, headers)
The send of the XML is of the form:
%3C%3Fxml%20version%3D%221.0%22%20encoding%22%3D%22UTF-8%20%22%3F%3E%0A%3CMainReq
uest%3E%0A%3CrequestEnvelope%3E%3CerrorLanguage%3Een_US%3C/errorLanguage%3E%0A%3
C/requestEnvelope%3E
The error message then indicates XML content is missing.
Any ideas would be helpful.