01-27-2015 12:01 AM
I'm working on directory numbers at the moment and I found something curious. Add a line without the confidentialAccess tag altogether. Do a get, and you'll get
<confidentialAccessLevel><confidentialAccessMode/><confidentialAccessLevel>-1</confidentialAccessLevel>
Then take that object, and do an update with it tag for tag, and you^'ll be informed that you need to specify a value for confidentialAccessMode (axlcode: 5003, axlmessage: Invalid value for confidentialAccessLevel).
I'd argue that unless I'm using tags that are not allowed in an update operation, sending what you get from a get operation back in form of an update should pass. I agree that setting a confidentialAccessLevel without a confidentialAccessMode makes little sense, but then, getLine should not return the confidentialAccessLevel tag with contents in the first place.
Here's my full update
<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:updateLine sequence="5"> <uuid>{0CFFB7AA-1C78-6D02-A027-F0411B2AD599}</uuid><newPattern>1977</newPattern><description>gugus gaga</description><newRoutePartitionName>p_gateways</newRoutePartitionName><aarDestinationMask></aarDestinationMask><aarKeepCallHistory>false</aarKeepCallHistory><aarVoiceMailEnabled>true</aarVoiceMailEnabled><callForwardAll><forwardToVoiceMail>False</forwardToVoiceMail><callingSearchSpaceName>c_internal</callingSearchSpaceName><secondaryCallingSearchSpaceName>c_all</secondaryCallingSearchSpaceName><destination></destination></callForwardAll><callForwardBusy><forwardToVoiceMail>True</forwardToVoiceMail><callingSearchSpaceName uuid="{E5D251B9-98E2-D6EB-BE14-A09F4DE92CAD}">c_international</callingSearchSpaceName><destination>1234</destination></callForwardBusy><callForwardBusyInt><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardBusyInt><callForwardNoAnswer><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNoAnswer><callForwardNoAnswerInt><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNoAnswerInt><callForwardNoCoverage><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNoCoverage><callForwardNoCoverageInt><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNoCoverageInt><callForwardOnFailure><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardOnFailure><callForwardAlternateParty><destination></destination></callForwardAlternateParty><callForwardNotRegistered><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNotRegistered><callForwardNotRegisteredInt><forwardToVoiceMail>False</forwardToVoiceMail><destination></destination></callForwardNotRegisteredInt><autoAnswer>Auto Answer Off</autoAnswer><networkHoldMohAudioSourceId>-1</networkHoldMohAudioSourceId><userHoldMohAudioSourceId>1</userHoldMohAudioSourceId><alertingName>Hänsli Mülier</alertingName><asciiAlertingName>Haensli Blubberli</asciiAlertingName><presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName><shareLineAppearanceCssName>c_international</shareLineAppearanceCssName><voiceMailProfileName uuid="{16C584EA-6A81-4138-9EA1-AF452DE8F75A}">Default</voiceMailProfileName><patternPrecedence>Default</patternPrecedence><releaseClause>No Error</releaseClause><hrDuration>1</hrDuration><hrInterval>1</hrInterval><cfaCssPolicy>With Activating Device/Line CSS</cfaCssPolicy><parkMonForwardNoRetrieveIntDn></parkMonForwardNoRetrieveIntDn><parkMonForwardNoRetrieveVmEnabled>false</parkMonForwardNoRetrieveVmEnabled><parkMonForwardNoRetrieveIntVmEnabled>false</parkMonForwardNoRetrieveIntVmEnabled><parkMonForwardNoRetrieveCssName>c_all</parkMonForwardNoRetrieveCssName><parkMonReversionTimer>20</parkMonReversionTimer><partyEntranceTone>Off</partyEntranceTone><allowCtiControlFlag>false</allowCtiControlFlag><rejectAnonymousCall>true</rejectAnonymousCall><confidentialAccess ><confidentialAccessMode/><confidentialAccessLevel>-1</confidentialAccessLevel></confidentialAccess ><enterpriseAltNum><numMask></numMask></enterpriseAltNum><e164AltNum><numMask></numMask></e164AltNum><pstnFailover></pstnFailover><callControlAgentProfile></callControlAgentProfile><useEnterpriseAltNum>false</useEnterpriseAltNum><useE164AltNum>false</useE164AltNum><active>true</active></ns:updateLine></soapenv:Body></soapenv:Envelope>
@edit: the alternate enterprise numbers seem to have the same behavior. I got another 5003 with message "if tag EnterpriseAltNum has value, tag UseEnterpriseAltNum cannot be set to false". And I'm only sending an enterpriseAltEnum in the first place gecause getLine got me one (with a non null, but empty string value for numMask and false for all the booleans - the full getLine result can be seen here:
<line uuid="{0CFFB7AA-1C78-6D02-A027-F0411B2AD599}"><pattern>7306</pattern><description>This is descriptschion</description><usage>Device</usage><routePartitionName uuid="{82056F6A-7CF2-48DA-BDEB-9E17B12DE19D}">p_phones</routePartitionName><aarNeighborhoodName/><aarDestinationMask/><aarKeepCallHistory>false</aarKeepCallHistory><aarVoiceMailEnabled>true</aarVoiceMailEnabled><callForwardAll><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><secondaryCallingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardAll><callForwardBusy><forwardToVoiceMail>true</forwardToVoiceMail><callingSearchSpaceName uuid="{E5D251B9-98E2-D6EB-BE14-A09F4DE92CAD}">c_international</callingSearchSpaceName><destination>1234</destination></callForwardBusy><callForwardBusyInt><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardBusyInt><callForwardNoAnswer><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /><duration /></callForwardNoAnswer><callForwardNoAnswerInt><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /><duration /></callForwardNoAnswerInt><callForwardNoCoverage><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardNoCoverage><callForwardNoCoverageInt><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardNoCoverageInt><callForwardOnFailure><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardOnFailure><callForwardAlternateParty><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /><duration /></callForwardAlternateParty><callForwardNotRegistered><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardNotRegistered><callForwardNotRegisteredInt><forwardToVoiceMail>false</forwardToVoiceMail><callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><destination /></callForwardNotRegisteredInt><callPickupGroupName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><autoAnswer>Auto Answer Off</autoAnswer><networkHoldMohAudioSourceId>-1</networkHoldMohAudioSourceId><userHoldMohAudioSourceId>1</userHoldMohAudioSourceId><alertingName>Hänsli Meyer</alertingName><asciiAlertingName>Haensli Meyer</asciiAlertingName><presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName><shareLineAppearanceCssName uuid="{DBBD54BA-AFDC-F929-67BF-AEA95C281A39}">CSS_intern</shareLineAppearanceCssName><voiceMailProfileName uuid="{16C584EA-6A81-4138-9EA1-AF452DE8F75A}">Default</voiceMailProfileName><patternPrecedence>Default</patternPrecedence><releaseClause>No Error</releaseClause><hrDuration>5</hrDuration><hrInterval>10</hrInterval><cfaCssPolicy>With Configured CSS</cfaCssPolicy><defaultActivatedDeviceName/><parkMonForwardNoRetrieveDn>2010</parkMonForwardNoRetrieveDn><parkMonForwardNoRetrieveIntDn /><parkMonForwardNoRetrieveVmEnabled>false</parkMonForwardNoRetrieveVmEnabled><parkMonForwardNoRetrieveIntVmEnabled>false</parkMonForwardNoRetrieveIntVmEnabled><parkMonForwardNoRetrieveCssName uuid="{D6B998FE-B8F5-2BC3-3BFB-B8F5C24B9BA8}">c_all</parkMonForwardNoRetrieveCssName><parkMonForwardNoRetrieveIntCssName/><parkMonReversionTimer>10</parkMonReversionTimer><partyEntranceTone>On</partyEntranceTone><directoryURIs/><allowCtiControlFlag>false</allowCtiControlFlag><rejectAnonymousCall>true</rejectAnonymousCall><patternUrgency>false</patternUrgency><confidentialAccess><confidentialAccessMode /><confidentialAccessLevel>-1</confidentialAccessLevel></confidentialAccess><externalCallControlProfile/><enterpriseAltNum><numMask /><isUrgent>f</isUrgent><addLocalRoutePartition>f</addLocalRoutePartition><routePartition/><advertiseGloballyIls>f</advertiseGloballyIls></enterpriseAltNum><e164AltNum><numMask /><isUrgent>f</isUrgent><addLocalRoutePartition>f</addLocalRoutePartition><routePartition/><advertiseGloballyIls>f</advertiseGloballyIls></e164AltNum><pstnFailover /><callControlAgentProfile /><associatedDevices/><useEnterpriseAltNum>false</useEnterpriseAltNum><useE164AltNum>false</useE164AltNum><active>true</active></line>
Again I'd argue that if there's no data (ccmadmin doesn't show anything), then axl shouldn't return this data (in other words.. we have some bugs herr.. time to add more workaround code to my object parsing).
the alternate numbers seem to be similarly affected
01-27-2015 08:07 AM
With few exceptions, a get will return all the available information. It is up to the application to decide what to do with that information. In this case, if it didn't return the tag, the application wouldn't know there is no confidential access. The application should see the tag is empty and then not use the tag in an update unless you want to add confidential access.
01-27-2015 11:15 AM
But.. that requires intrinsic knowledge about the meaning of every complex tag... empty may not necessarily be empty, there may be values (like with the confidentialAccess that even though basically is empty, you may not use this way for an add).
Now say we're talking about a string value. There's two kinds of meanings for an empty but still present tag
I realize there are solutions (I implemented one), but it seems not quite as straightforward as I think it should be (get, modify, add being the approach you want to take for "set me up a new device that is like that other device except....")
01-28-2015 04:42 AM
What are those exceptions and why?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide