cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2265
Views
0
Helpful
2
Replies

getting the 401, Unauthorized error when i try to invoke any method on client object

dilipreddy.guda
Level 1
Level 1

I am using python script based on AXL plugin to try access CUCM . I am getting the below error when i try to invoke any method on client object . Need help on how i can overcome the problem.

<suds.sax.document.Document object at 0x089B0A90>

(401, 'Unauthorized')

Any help would be appreciated.

code snippet :

============

context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)

context.verify_mode = ssl.CERT_REQUIRED

context.check_hostname = True

context.load_default_certs()

ssl._create_default_https_context = ssl._create_unverified_context

client = Client(wsdl,location=location,faults=False,plugins=[ImportDoctor(imp)],

                username=username,password=password)

print("=============================================")

result = client.service.getPhone(name = 'SEP0038DF01B49F')

#print(client.service.listPhone())

print(result)

result = client.service.getPhone(name = 'SEP0038DF01B49F')

#print(client.service.listPhone())

2 Replies 2

r.boloor.rao
Level 1
Level 1

which version of the cucm you are using ?.  I was getting this error ( was using java client) when my URL was not correctly configured. ( https://<cucmIp>:8443/axl/ ) I was missing the "/" at the end of URL.

-Raghu Rao

zerocool443
Cisco Employee
Cisco Employee
Were you able to resolve this. Please provide with the resolution if possible.