我试图从SOAP获取密码,但得到了一个错误,我也不知道我必须在哪里指定p12文件的密码,以便它可以读取。我给出了密钥库中的p12文件路径
import requests
url="myurl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'application/soap+xml','Name': 'Request','Message Size': '358','Encoding': 'UTF-8','Endpoint': 'endpointurl','Follow Redirects': 'true','Authorization Type': 'No Authorization','SSL Keystore': "p12 filepath",'Disable multiparts': 'true','Pretty Print': 'true'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ejb3="http://ejb3.pwAccel.edmz.com/">
<soapenv:Header/>
<soapenv:Body>
<ejb3:handleRequestWS>
<systemName>systemname</systemName>
<accountName>username</accountName>
</ejb3:handleRequestWS>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.post(url,data=body,headers=headers)
print response.content
错误消息:
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed (_ssl.c:661)
目前没有回答
相关问题 更多 >
编程相关推荐