07-19-2016 09:20 AM
Hi,
When I do a getUser, the "serviceProfile" returns the same valueas either the "default value" or the service profile specified as default. But if the default service profile is changed, the value on the user will change if it's "default value" but not if it was the specified service profile.
So how to know if the "serviceProfile" of a "getUser" is the "default value" or not?
Thanks,
Fabien
Solved! Go to Solution.
09-21-2016 10:13 AM
Looks like this is somewhat of a limitation of AXL, in that the schema does not define a good way to indicate both the fact that the service profile should be whatever the current 'default' is as well as the actual current value of the default service profile.
I can see two potential enhancements:
- Add an attribute to the <serviceProfile) like 'isDefault'/boolean which indicates if the service profile shown is there because it is the system default, or because it was specifically set
- Change the behaviour so that when the service profile is none/default, <getUser> returns an empty value in <serviceProfile>. Apps would then need to know to go query <listServiceProfile> to determine the current system default, if they needed it.
Your hinted workaround is probably the best one, i.e. check the value of the table via SQL to determine if a specific value has been set or not.
09-09-2016 01:27 PM
You can use <listServiceProfile> to get a listing of all service profiles on the system. Zero or one of the service profiles will have <isDefault>=true if it is the system default:
https://developer.cisco.com/media/axl-schema-11-5/Files/AXLSoap_ListServiceProfileRes.html#Link46F3
09-13-2016 02:11 AM
Sorry, the question was not really clear.
When I'm editing a user on the CUCM, it's possible to set the "UC Service Profile" to "Use System Default"
In this case, the result of getUser is :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.0">
<return>
<user uuid="{0E8775DB-AE6D-610A-F9A6-D6882017B10F}">
<serviceProfile uuid="{614B592D-D5AD-FAB4-2206-08F3545A0540}">SP_R11</serviceProfile>
</user>
</return>
</ns:getUserResponse>
</soapenv:Body>
</soapenv:Envelope>
But it's also possible to set the "UC Service Profile" to the corresponding system default
In this case, the result of getUser is :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.0">
<return>
<user uuid="{0E8775DB-AE6D-610A-F9A6-D6882017B10F}">
<serviceProfile uuid="{614B592D-D5AD-FAB4-2206-08F3545A0540}">SP_R11</serviceProfile>
</user>
</return>
</ns:getUserResponse>
</soapenv:Body>
</soapenv:Envelope>
So the result of getUser is exactly the same despite that the "UC Service Profile" is not the same (if someone change the system default, it will change in the first case but not in the second case).
If I do a SQL request, the fkucserviceprofile of the enduser is in the first case empty and in the second case the pkid.
Why is there no difference in the result of AXL getUser?
Regards,
Fabien
09-21-2016 10:13 AM
Looks like this is somewhat of a limitation of AXL, in that the schema does not define a good way to indicate both the fact that the service profile should be whatever the current 'default' is as well as the actual current value of the default service profile.
I can see two potential enhancements:
- Add an attribute to the <serviceProfile) like 'isDefault'/boolean which indicates if the service profile shown is there because it is the system default, or because it was specifically set
- Change the behaviour so that when the service profile is none/default, <getUser> returns an empty value in <serviceProfile>. Apps would then need to know to go query <listServiceProfile> to determine the current system default, if they needed it.
Your hinted workaround is probably the best one, i.e. check the value of the table via SQL to determine if a specific value has been set or not.
09-22-2016 12:45 AM
Thank you for this answer. Is it possible to open an enhancement ticket for a future release?
09-22-2016 07:58 AM
I've created an enhancement request...engineering will prioritize accordingly.
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