AXL querys (get* or list*) how to get all attribute data?

Version 1
    This document was generated from CDN thread

    Created by: Geoffrey Carman on 15-02-2013 11:33:06 AM
    When you look at the SOAP from the WSDL for all the get* and list* functions in AXL, you see a <returnedTags> node, where you leave the empty names of the filelds you wish returned.  Thus the name, returnedTags.
    CUCM 8.6.1
    Is there a way to specify all attributes?  I.e. I could build this doc:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:listUser sequence="?">
             <searchCriteria>
                <userid>SomeUserID</userid>
             </searchCriteria>
             <returnedTags uuid="?">
                <firstName/>
                <middleName/>
                <lastName/>
                <userid/>
                <telephoneNumber/>
                <mailid/>
                <department/>
                <manager/>
                <userLocale/>
                <primaryExtension>
                      <pattern/>
                      <routePartitionName/>
                </primaryExtension>
                <associatedPc/>
                <enableCti/>
                <presenceGroupName uuid="?"/>
                <subscribeCallingSearchSpaceName uuid="?"/>
                <enableMobility/>
                <enableMobileVoiceAccess/>
                <maxDeskPickupWaitTime/>
                <remoteDestinationLimit/>
                <status/>
                <enableEmcc/>
             </returnedTags>
             <!--Optional:-->
             <skip>?</skip>
             <!--Optional:-->
             <first>?</first>
          </ns:listUser>
       </soapenv:Body>
    </soapenv:Envelope>
     
    But surely there is a better shortcut for 'all attributes'?  I say this, since in my testing, I somehow triggered what I think is that shortcut, but I lost the example in all my testing, and did not notice it stop sending all, so I have no clue what I did to get 'all attributes'? 
     

    Subject: RE: AXL querys (get* or list*) how to get all attribute data?
    Replied by: Geoffrey Carman on 15-02-2013 11:55:19 AM
    You would think so.  I tried that earlier. 
     
    sent in:
        <soapenv:Envelope xmlns:ns="http://www.cisco.com/AXL/API/8.5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
          <soapenv:Header/>
          <soapenv:Body>
            <ns:listDeviceProfile sequence="?">
              <searchCriteria>
                <name>%</name>
              </searchCriteria>
            </ns:listDeviceProfile>
          </soapenv:Body>
        </soapenv:Envelope>


     
    Returns:
        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
          <soapenv:Body>
            <soapenv:Fault>
              <faultcode>soapenv:Server</faultcode>
              <faultstring>Usage: Required returnedTags as empty tag or should contain requested tags</faultstring>
              <detail>
                <axlError>
                  <axlcode>5003</axlcode>
                  <axlmessage>Usage: Required returnedTags as empty tag or should contain requested tags</axlmessage>
                  <request>listDeviceProfile</request>
                </axlError>
              </detail>
            </soapenv:Fault>
          </soapenv:Body>
        </soapenv:Envelope>


    So I beg to differ.    Did get the header right I think, Auth and SOAPAction: CUCMB ver=8.5 listDeviceProfile

    Subject: RE: AXL querys (get* or list*) how to get all attribute data?
    Replied by: Geoffrey Carman on 15-02-2013 11:59:02 AM
    Converesly, an empty <returnedTags> node does a little better, but not quite what I want:
    send in:
        <soapenv:Envelope xmlns:ns="http://www.cisco.com/AXL/API/8.5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
          <soapenv:Header/>
          <soapenv:Body>
            <ns:listDeviceProfile sequence="?">
              <searchCriteria>
                <name>%</name>
              </searchCriteria>
              <returnedTags ctiid="?" uuid="?"/>
            </ns:listDeviceProfile>
          </soapenv:Body>
        </soapenv:Envelope>


    Returns:
        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
          <soapenv:Body>
            <ns:listDeviceProfileResponse xmlns:ns="http://www.cisco.com/AXL/API/8.5">
              <return>
                <deviceProfile uuid="{E5CD8187-B81B-060B-B6F3-2829D8BB61EF}"/>
                <deviceProfile uuid="{ED2174F8-BF3A-9904-503E-D961DBA0DDE2}"/>
     and repeat....
     
    But only the UUID for all, when I want all the attributes.  So looks like <returnedTags> is mandatory. 

    Subject: RE: AXL querys (get* or list*) how to get all attribute data?
    Replied by: David Staudt on 15-02-2013 11:48:25 AM
    Just omit the <returnedTags> element altogether:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:getCss sequence="1">
             <name>testCSS2</name>
          </ns:getCss>
       </soapenv:Body>
    </soapenv:Envelope>
    -------------------------------------
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <ns:getCssResponse xmlns:ns="http://www.cisco.com/AXL/API/8.5">
             <return>
                <css uuid="{625DA07D-962D-A1E4-CBD6-EBBB68A16146}">
                   <name>testCSS2</name>
                   <description/>
                   <clause/>
                   <dialPlanWizardGenId/>
                   <members/>
                   <partitionUsage>General</partitionUsage>
                </css>
             </return>
          </ns:getCssResponse>
       </soapenv:Body>
    </soapenv:Envelope>

    Subject: RE: AXL querys (get* or list*) how to get all attribute data?
    Replied by: Geoffrey Carman on 15-02-2013 12:41:12 PM
    David Staudt:
    Looking at the schema, it shows that <returnedTags> is optional for getCss and required for listCss.  Glancing at a few other getXXX and listXXX requests seems to bear out that pattern: listXXX requests require a <returnedTags>, and any fields you want to see must be specified. 
    An option to request all available fields for a listXXX request sounds like a good enhancement.  I can see that working either by behaving like the getXXX requests - where if you ommitt <returnedTags> than all tags are provided - or perhaps via an attribute, like <returnedTags all="True">.  The first has some benefits by way of backward compatibility for older apps that are unaware of <returnedTags>.

     
    Thanks!!! THat is a critical distinction I did not make.  list*** requires the returnedTags, and get**** does not.  That may explain why I saw it work one way and then not again.  That really helps, catching that distinction.  Thank you!.  I like the @all='true' approach as well.
     

    Subject: RE: AXL querys (get* or list*) how to get all attribute data?
    Replied by: David Staudt on 15-02-2013 12:16:26 PM
    Looking at the schema, it shows that <returnedTags> is optional for getCss and required for listCss.  Glancing at a few other getXXX and listXXX requests seems to bear out that pattern: listXXX requests require a <returnedTags>, and any fields you want to see must be specified. 
    An option to request all available fields for a listXXX request sounds like a good enhancement.  I can see that working either by behaving like the getXXX requests - where if you ommitt <returnedTags> than all tags are provided - or perhaps via an attribute, like <returnedTags all="True">.  The first has some benefits by way of backward compatibility for older apps that are unaware of <returnedTags>.