cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1184
Views
1
Helpful
4
Replies

How to get the universal device template "Sample Device Template with TAG usage examples" using AXL

fabien.bonic
Level 5
Level 5

Hello,

On my CUCM, there is a Universal Device Template named "Sample Device Template with TAG usage examples". I need to retrieve its values using the request getUniversalDeviceTemplate but when I use this request on this particular UDT, I always have the fault "Item not valid: The specified UniversalDeviceTemplate was not found".

I have tried using the name or the UUID with the same result...

When I do the same request on another UDT, there is no problem...

Why do I have this AXL Error despite that the UDT exists?

Thanks,

Fabien

The request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:getUniversalDeviceTemplate sequence="?">

         <uuid>Sample Device Template with TAG usage examples</uuid>

      </ns:getUniversalDeviceTemplate>

   </soapenv:Body>

</soapenv:Envelope>

The response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>Item not valid: The specified null was not found</faultstring>

         <detail>

            <axlError>

               <axlcode>5007</axlcode>

               <axlmessage>Item not valid: The specified null was not found</axlmessage>

               <request>getUniversalDeviceTemplate</request>

            </axlError>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

The SQL query showing this UDT name:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:executeSQLQuery>

         <sql>select name from device where tkmodel=645</sql>

      </ns:executeSQLQuery>

   </soapenv:Body>

</soapenv:Envelope>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:executeSQLQueryResponse xmlns:ns="http://www.cisco.com/AXL/API/10.0">

         <return>

            <row>

               <name>Sample Device Template with TAG usage examples</name>

            </row>

            <row>

               <name>Auto-registration Template</name>

            </row>

            <row>

               <name>universalDevTemp</name>

            </row>

            <row>

               <name>testGeake</name>

            </row>

            <row>

               <name>testGeake2</name>

            </row>

         </return>

      </ns:executeSQLQueryResponse>

   </soapenv:Body>

</soapenv:Envelope>

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

Not sure why that template is not accessible, perhaps as it is intended as a 'sample' the implementation filters it out of results.  You should be able to retrieve the details via SQL and <executeSqlQuery>, e.g.:

select * from device where name = "Sample Device Template with TAG usage examples"

charlie.munro
Level 1
Level 1

There's always a chance with AXL APIs that the error is not about the object you're requesting. Notice the error message:

Item not valid: The specified null was not found

It's not saying the UDT wasn't found. It does really say what was found at all.

Follow David's suggestion above and see if there's a NULL in a foreign key (fk) value on the sample that's not null in other templates. Or turn on detailed/debug trace for AXL and see if that tells you exactly what is missing.

fabien.bonic
Level 5
Level 5

After a "save" on the CUCM, the request works. It seems that requests using AXL can put components in an unstable state...

Didn't notice before but you used this:

<uuid>Sample Device Template with TAG usage examples</uuid>


and that's the name value, not the UUID for the template. Maybe second time you used the <name> tag?


Good luck.

Charlie