nerdexam
Cisco

300-835 · Question #38

Drag and drop the code snippets from the bottom onto the blanks in the code to automate a query to list all phones on a test Cisco UCM cluster using an AXL SOAP request. Not all options are used.

The options field is empty - no code snippets were included in your message. I can't identify the correct drag-and-drop answers without them. That said, here's a thorough explanation of the concept and typical approach so you understand the reasoning regardless of the specific…

Question

Drag and drop the code snippets from the bottom onto the blanks in the code to automate a query to list all phones on a test Cisco UCM cluster using an AXL SOAP request. Not all options are used.

Explanation

The options field is empty - no code snippets were included in your message. I can't identify the correct drag-and-drop answers without them.

That said, here's a thorough explanation of the concept and typical approach so you understand the reasoning regardless of the specific blanks:


Overall Goal

The Cisco AXL (Administrative XML Layer) API lets you programmatically administer a UCM cluster over SOAP/HTTPS. To list all phones, you send a listPhone SOAP request and parse the XML response. This is the correct approach because AXL is the official, supported administrative API - it handles authentication, schema versioning, and returns structured data.


Typical Python Structure (zeep or requests)

1. Import libraries

from zeep import Client
from zeep.transports import Transport
from requests import Session
from requests.auth import HTTPBasicAuth
import urllib3
urllib3.disable_warnings()

Why: zeep is the standard Python SOAP client. You disable SSL warnings because test/lab UCM clusters use self-signed certificates.


2. Define connection parameters

ucm_host = "https://<UCM_IP>:8443/axl/"
username = "admin"
password = "cisco"
wsdl = "AXLAPI.wsdl"

Why: AXL runs on port 8443. The WSDL file defines the schema - zeep needs it to know valid request/response shapes. Without the WSDL, zeep cannot construct typed SOAP calls.


3. Create an authenticated session

session = Session()
session.verify = False
session.auth = HTTPBasicAuth(username, password)
transport = Transport(session=session)

Why: AXL requires HTTP Basic Auth. Setting verify=False bypasses SSL cert validation for lab environments. Skipping auth results in a 401 Unauthorized.


4. Instantiate the SOAP client

client = Client(wsdl=wsdl, transport=transport)
service = client.create_service(
    "{http://www.cisco.com/AXLAPIService/}AXLAPIServiceSoap",
    ucm_host
)

Why: The create_service call binds the WSDL-defined operations to the actual UCM endpoint. The namespace URI must match exactly - a typo here causes a binding error.


5. Execute the query

response = service.listPhone(
    searchCriteria={"name": "%"},
    returnedTags={"name": "", "description": ""}
)

Why:

  • name: "%" is a SQL wildcard - matches all phones.
  • returnedTags controls which fields are returned (omitting it can return excessive data or cause schema errors).
  • Without searchCriteria, the call fails - it's a required parameter.

6. Print/process results

for phone in response["return"]["phone"]:
    print(phone["name"])

Why: The response is nested under returnphone. Accessing the wrong key returns None or raises a KeyError.


What Goes Wrong if Steps Are Skipped

Skipped StepResult
No WSDLzeep cannot parse the schema → TypeError
No auth401 Unauthorized from UCM
verify=False missingSSLError on self-signed cert
Wrong namespace in create_serviceLookupError: No binding found
No returnedTagsMay return schema error or too much data
Wrong wildcard ("" instead of "%")Returns zero results

Memory Tip

Think of it as "WSDL → Session → Client → Query → Parse" - you must describe the schema before you can connect, connect before you can query, and query before you can parse. Each step depends on the one before it.


Please paste the actual code snippets from the question and I can map each one to the correct blank precisely.

Community Discussion

No community discussion yet for this question.

Full 300-835 Practice