cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
709
Views
0
Helpful
2
Replies

listUser - how to extract primary Extension

stephan.steiner
Spotlight
Spotlight

Hi

I want to do a list request on users that just returns userId and primary extension (if there's one). My requests do work, however, they all only contain the userid even though several users have primary extensions defined.

I'm adding <primaryExtension/pattern/> and <primaryExtension/routePartitionName/> to my <returnTags> but it doesn't work (actually, I encode the slash within the tag with 0x2f so it's valid XML. If I just add <pattern/> and <routePartitionName/> I have the same story.. all users are returned, none with a primary extension.

Has anybody managed to write a request that gets you both userid and primary extension?

2 Replies 2

npetrele
Cisco Employee
Cisco Employee

Maybe I don't understand the problem, but this works fine for me:

<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 sequence="?">

         <searchCriteria>

            <userid>%</userid>

         </searchCriteria>

         <returnedTags uuid="?">

           <userid/>

            <primaryExtension>

               <pattern/>

               <routePartitionName/>

            </primaryExtension>

         </returnedTags>

      </ns:listUser>

   </soapenv:Body>

</soapenv:Envelope>

Thanks Nicholas. Somehow the tag with inner tags thing slipped my mind. I blame my former colleague who didn't quite test return tags in our custom lib (it wasn't set up to support inner tags so my query ended up being <returnedTags><userId/><primaryExtension/pattern/><primaryExtension/routePartitionName/></returnTags> which didn't work out. Supporting inner tags in a return tag fixed the issue.