cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2299
Views
0
Helpful
11
Replies

How to get the directory and the contacts stored in CUCM using AXL API..?

YouTee
Level 1
Level 1

Is there a way to get the directory using the AXL API..?

I have done the below steps:

In CUCM, go to Application->Plugins, then click Find and download the Cisco AXL Toolkit. Unzip it, and import the WSDL file into SoapUI.

I am unable to find any request method which can get me the directory. I tried to work with different versions on AXL (from 9.0 to 11.5) for executing a SQL query using the 'executeSQLQuery' method but it gives me the below error.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>java.lang.NoClassDefFoundError: Could not initialize class com.cisco.www.axl.api._8_0.ExecuteSQLQueryDocument</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

 

How can I overcome this error..?

Is there any specific method in AXL API which can help me in getting the CUCM directory..?

11 Replies 11

Anusha B R
Cisco Employee
Cisco Employee

Hi,

Are you talking about LDAP directory, if so, you can use getLdapDirectory AXL API, below is the schema reference for the same,

https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_GetLdapDirectoryReq.html#Link449

Regards,

Hi Anusha,

Thanks for your reply. It turned out to be an issue with my CUCM configuration.

dstaudt
Cisco Employee
Cisco Employee

Can you provide some more details on what you mean by getting the directory?  If you want to search the CUCM users, for example by name or to get a complete listing, see the AXL <listUser> request: https://developer.cisco.com/docs/axl-schema-reference/

 

What was the request you sent to CUCM?
Your Faulty Response does not give any hint to what you were trying to do

Hi,

 

Thanks for your reply. It turned out to be an issue with my CUCM configuration.

Hi,

Thanks for your reply. It turned out to be an issue with my CUCM configuration.

Hi, 

I'm facing the same issue,

could you tell me what was the issue with your CUCM configuration ?

Hey Hazem,

Are you trying to retrieve the users? Could you explain what you were trying and where you are hitting issue?

Thanks,
Anusha B R

Hey Anusha,

I treing to do any axl request with java e.x ExecuteSQLQuery but I got this   

 

exception:Client received SOAP Fault from server: java.lang.NoClassDefFoundError: Could not initialize class com.cisco.www.axl.api._8_0.ExecuteSQLQueryDocument Please see the server log to find more detail regarding exact cause of the failure.

and the trace looks like that:

2020-11-12 11:59:20,034 DEBUG [http-bio-1027-exec-8] servletRouters.AXLAlpha - Request processed by AXIS
2020-11-12 11:59:20,038 DEBUG [http-bio-1027-exec-8] servletRouters.AXLAlpha - <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>java.lang.NoClassDefFoundError: Could not initialize class com.cisco.www.axl.api._8_0.AddRoutePartitionDocument</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
2020-11-12 11:59:20,039 DEBUG [http-bio-1027-exec-8] servletRouters.AXLAlpha - Finished processing request
2020-11-12 11:59:20,039 INFO [http-bio-1027-exec-8] filters.TimingFilter - Request 1421170167997 received from AXL_User at ip 172.27.8.92 was processed in 32ms
2020-11-12 11:59:20,072 DEBUG [http-bio-81-exec-24] filters.TimingFilter - Received request 1421170167998 from AXL_User at IP 172.27.8.92
2020-11-12 11:59:20,072 DEBUG [http-bio-81-exec-24] wrappers.RequestHeaderWrapper - Inside Request Header Wrapper
2020-11-12 11:59:20,072 DEBUG [http-bio-81-exec-24] filters.AuthenticationFilter - Operation:executeSQLQuery api:executeSQLQuery
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] filters.ThrottlingFilter - Successfully set the value of counter: 4 value: 0
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - Checking request version [12.5]
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - Checking if requested api [executeSQLQuery] the implementedHandlers list
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - [executeSQLQuery] is not in the implementedHandlers list
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - Checking if version is 8.x or 9.x
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - function to check if the version is 8.x or 9.x
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - version is not 8.x or 9.x
2020-11-12 11:59:20,073 INFO [http-bio-81-exec-24] servletRouters.AXLAlpha - Executing api: executeSQLQuery in axis
2020-11-12 11:59:20,073 DEBUG [http-bio-81-exec-24] wrappers.RequestNamespaceWrapper - Inside Request Wrapper
2020-11-12 11:59:20,074 DEBUG [http-bio-81-exec-24] servletRouters.AXLAlpha - AXL REQUEST :

<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:executeSQLQuery xmlns:ns2="http://www.cisco.com/AXL/API/12.5"><sql>select count(Device.name) from Device inner join DevicePool on Device.fkDevicePool=DevicePool.pkid where DevicePool.name ='test_123__Tenant__DP1'</sql></ns2:executeSQLQuery></S:Body></S:Envelope>

 

I don't know what to do ?

Hi Hazem,

It looks like java error. Did you had a chance to check this link https://community.cisco.com/t5/management/demo-java-error-for-cucm-10/td-p/3513343

Probably you would get some clue.

Regards,
Anusha B R

dstaudt
Cisco Employee
Cisco Employee

Might take a look at <listUser>:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:listUser>
         <searchCriteria>
            <firstName>David</firstName>
            <lastName>%</lastName>
            <userid>%staudt%</userid>
            <department></department>
         </searchCriteria>
         <returnedTags>
            <userid/>
            <telephoneNumber/>
         </returnedTags>
      </ns:listUser>
   </soapenv:Body>
</soapenv:Envelope>
------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:listUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.5">
<return>
<user uuid="{C83500BE-3606-A43A-F5E3-BAC93E6C3475}">
<userid>dstaudt</userid>
<telephoneNumber/>
</user>
<user uuid="{F0509AAF-BB47-D4C7-D56C-78CC3B114A72}">
<userid>dstaudt2</userid>
<telephoneNumber/>
</user>
<user uuid="{2A661528-0C7D-D820-A241-58965586B4CA}">
<userid>dstaudt4</userid>
<telephoneNumber/>
</user>
</return>
</ns:listUserResponse>
</soapenv:Body>
</soapenv:Envelope>

If you want to get further details, you can use <getUser> to retrieve individual user details.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: