05-08-2018 04:22 AM - last edited on 03-25-2019 07:05 PM by ciscomoderator
My Python Script:
from suds.client import Client
wsdl="file:///D:/axlsqltoolkit/schema/current/AXLAPI.wsdl"
location = 'https://10.1.9.202:8443/axl/'
username="XXXXXX"
password="XXXXX"
client=Client(wsdl,location=location,username=username,password=password)
resp = client.service.listPhone({'name': 'SEP%'}, returnedTags={'name': '', 'description': ''})
But display error:
Traceback (most recent call last):
File "C:/Users/jiguoying/PycharmProjects/untitled1/Ji-Python/CUCM.py", line 10, in <module>
resp = client.service.listPhone({'name': 'SEP%'}, returnedTags={'name': '', 'description': ''})
File "C:\Anaconda3\lib\site-packages\suds\client.py", line 521, in __call__
return client.invoke(args, kwargs)
File "C:\Anaconda3\lib\site-packages\suds\client.py", line 581, in invoke
result = self.send(soapenv)
File "C:\Anaconda3\lib\site-packages\suds\client.py", line 613, in send
reply = self.options.transport.send(request)
File "C:\Anaconda3\lib\site-packages\suds\transport\https.py", line 66, in send
return HttpTransport.send(self, request)
File "C:\Anaconda3\lib\site-packages\suds\transport\http.py", line 82, in send
fp = self.u2open(u2request)
File "C:\Anaconda3\lib\site-packages\suds\transport\http.py", line 132, in u2open
return url.open(u2request, timeout=tm)
File "C:\Anaconda3\lib\urllib\request.py", line 466, in open
response = self._open(req, data)
File "C:\Anaconda3\lib\urllib\request.py", line 484, in _open
'_open', req)
File "C:\Anaconda3\lib\urllib\request.py", line 444, in _call_chain
result = func(*args)
File "C:\Anaconda3\lib\urllib\request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Anaconda3\lib\urllib\request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "C:\Anaconda3\lib\http\client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "C:\Anaconda3\lib\http\client.py", line 1152, in _send_request
self.endheaders(body)
File "C:\Anaconda3\lib\http\client.py", line 1103, in endheaders
self._send_output(message_body)
File "C:\Anaconda3\lib\http\client.py", line 934, in _send_output
self.send(msg)
File "C:\Anaconda3\lib\http\client.py", line 877, in send
self.connect()
File "C:\Anaconda3\lib\http\client.py", line 1261, in connect
server_hostname=server_hostname)
File "C:\Anaconda3\lib\ssl.py", line 385, in wrap_socket
_context=self)
File "C:\Anaconda3\lib\ssl.py", line 760, in __init__
self.do_handshake()
File "C:\Anaconda3\lib\ssl.py", line 996, in do_handshake
self._sslobj.do_handshake()
File "C:\Anaconda3\lib\ssl.py", line 646, in do_handshake
match_hostname(self.getpeercert(), self.server_hostname)
File "C:\Anaconda3\lib\ssl.py", line 309, in match_hostname
% (hostname, dnsnames[0]))
ssl.CertificateError: hostname '10.1.9.202' doesn't match 'HDCMPUB.hikvision.com'
Process finished with exit code 1
05-08-2018 03:18 PM
I recommend you post this in the Cisco DevNet Community for more feedback and information.
I hope this helps.
Kelli Glass
Moderator for Cisco Customer Communities
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide