cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
970
Views
10
Helpful
2
Replies

Issue with Python/Zeep script to access CUCM PAWS using the wsdl.

mb2855
Level 1
Level 1

Hi All,

I am trying to retrieve information from my CUCM clusters via PAWS concerning node status and replication status for each node and the cluster as a whole.

The request works fine in SOAPUI (once I enabled WS-Addressing), and I have a Python script using the Requests library alone that also works. However, in trying to incorporate everything into a Python script using the Requests library, Zeep library, and the PAWS WSDL link, I continually get the following error when I call the 'getClusterStatus' method.

requests.exceptions.SSLError: HTTPSConnectionPool(host='10.x.x.x', port=8080): Max retries exceeded with url: /platform-services/services/ClusterNodesService.ClusterNodesServiceHttpsSoap11Endpoint/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)')))

Thanks for any assistance you may provide.

The code is attached.

 

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

At least in some versions, the PAWS WSDLs have the incorrect service port definition, specifying 8080 instead of the actual 8443:

dstaudt_0-1674241568706.png

You should be able to work around that at run time by using Zeep's Client.create_service() method, e.g. something like:

service = client.create_service( '{http://services.api.platform.vos.cisco.com}ClusterNodesServiceHttpBinding',
f'https://{os.getenv("CUCM_ADDRESS")}:8443/platform-services/services/ClusterNodesService.ClusterNodesServiceHttpsEndpoint/' )

 

View solution in original post

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

At least in some versions, the PAWS WSDLs have the incorrect service port definition, specifying 8080 instead of the actual 8443:

dstaudt_0-1674241568706.png

You should be able to work around that at run time by using Zeep's Client.create_service() method, e.g. something like:

service = client.create_service( '{http://services.api.platform.vos.cisco.com}ClusterNodesServiceHttpBinding',
f'https://{os.getenv("CUCM_ADDRESS")}:8443/platform-services/services/ClusterNodesService.ClusterNodesServiceHttpsEndpoint/' )

 

Thanks dstaudt.
Following your example I had to make a small change to get it to work.

See BOLDed parts that I changed.

service1 = client.create_service( '{http://services.api.platform.vos.cisco.com}ClusterNodesServiceSoap12Binding',
f'https://{node_ip}:8443/platform-services/services/ClusterNodesService.ClusterNodesServiceHttpsSoap12Endpoint/' )