List device profiles

Version 1
    This document was generated from CDN thread

    Created by: Axel Schemberg on 14-03-2011 12:07:50 PM
    Hello everybody,
     
    I would like to ask how to list all device profiles via AXL?
    As far as I know there is no listDeviceProfiles for CUCM 7.1.5, so may be this should be done via sql query ... any hints?
     
    Thanks in advance
     
    Axel

    Subject: RE: List device profiles
    Replied by: Stefan Schallmeiner on 14-03-2011 12:20:23 PM
    Hi Axel!
     
     
    Heres some Java-Code that does the trick:
     
     
    ListDeviceByNameAndClassReq rq = new ListDeviceByNameAndClassReq();
    rq.set_class("Device Profile");
    rq.setSearchString("%");
    ListDeviceResReturnDevice[] ret = stub.listDeviceByNameAndClass(rq).get_return();

    Subject: RE: List device profiles
    Replied by: Axel Schemberg on 15-03-2011 03:21:49 AM
    Hi Stefan,
     
    thank you for your quick answer. I think you are using the WSDL generated classes? I don't, that's why I need the xml for the AXL Request. Do you have it?
     
    Thanks in advance
     
    Axel

    Subject: RE: List device profiles
    Replied by: Stefan Schallmeiner on 15-03-2011 03:28:53 AM
    Hi Stefan,
     
    thank you for your quick answer. I think you are using the WSDL generated classes? I don't, that's why I need the xml for the AXL Request. Do you have it?
     
    Thanks in advance
     
    Axel


     
    I just tested in soap-ui, this is how the xml should look like:
     

    Authorization: Basic .....
    Host: xx.xx.xx.xx:8443
    Content-Length: 363
    SOAPAction: "listDeviceByNameAndClass"
    User-Agent: Jakarta Commons-HttpClient/3.0.1
    Content-Type: text/xml;charset=UTF-8
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/1.0">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:listDeviceByNameAndClass sequence="?">
             <searchString>%</searchString>
             <class>Device Profile</class>
          </ns:listDeviceByNameAndClass>
       </soapenv:Body>
    </soapenv:Envelope>

    Subject: RE: List device profiles
    Replied by: Axel Schemberg on 15-03-2011 03:50:27 AM
    Hi Stefan,
     
    thank you for your help.
     
    In the meantime I figured out which sql-Statement can be used: run sql SELECT name FROM Device where Device.tkDeviceProfile != 0 (on cli). This just returns the name, which is, what I am looking for.
     
    Kind regards
     
    Axel
     
    p.s. @Stefan, you may should "delete" the Authorizationstring.

    Subject: RE: List device profiles
    Replied by: Axel Schemberg on 15-03-2011 03:59:54 AM
    funny ... I have the edit button even for your postings. I changed it.
     
    Axel

    Subject: Antwort: New Message from Axel Schemberg in Administration XML (AXL) - Admi
    Replied by: Stefan Schallmeiner on 15-03-2011 04:06:10 AM
    cool thx





    Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden.

    Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications.

    Subject: RE: List device profiles
    Replied by: Stefan Schallmeiner on 15-03-2011 03:57:04 AM
    Hm,... i would but i don't find an "edit"-possibility