misleading error message in addUser / unable to set primary extension

Version 1
    This document was generated from CDN thread

    Created by: Stephan Steiner on 08-10-2013 04:05:06 AM
    When I'm sending the following (I realize the evenlope is missing...)

    <user><firstName>bbraun</firstName><lastName>test 4</lastName><userid>bbrauntest04</userid><password>bbraun01</password><pin>415113</pin><telephoneNumber>415113</telephoneNumber><userLocale>French France</userLocale><associatedDevices><device>TCTbbrauntest04</device></associatedDevices><primaryExtension><primaryExtension><pattern>415113</pattern></primaryExtension></primaryExtension><associatedGroups><userGroup><name>Standard CCM End Users</name></userGroup><userGroup><name>Standard CTI Enabled</name></userGroup></associatedGroups><enableCti>true</enableCti><digestCredentials>bbraun</digestCredentials><phoneProfiles><profileName>bbrauntest04</profileName></phoneProfiles><defaultProfile>bbrauntest04</defaultProfile><enableMobility>true</enableMobility><enableMobileVoiceAccess>true</enableMobileVoiceAccess><primaryDevice>TCTbbrauntest04</primaryDevice><ctiControlledDeviceProfiles><profileName>bbrauntest04</profileName></ctiControlledDeviceProfiles></user>

    (the device and device profiles do exist), I get back the following error

    Primary Extension DN should be associated with the associated devices of the User

    Now... the device TCTbbrauntest04 does exist, as does the DN 415113 - and the device is also in the list of associated devices. So.. the error message is misleading... it implies that the request is wrong, whereas the problem is that to set the primary line, you first need to create the user, then update it setting the primary line.

    And then here comes the bug (I really wished they'd resolve my CDN membership issues already so I can file immediately).. sending the following update command

    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">-<SOAP-ENV:Body>-<axl:updateUser
    xmlns:axl="http://www.cisco.com/AXL/API/9.1" xsi:schemaLocation="http://www.cisco.com/AXL/API/9.1
    http://ccmserver/schema/axlsoap.xsd
    "
    sequence="1234"> <userid>bbrauntest04</userid> <firstName>bbraun</firstName> <lastName>test 4</lastName> <password>bbraun01</password> <pin>415113</pin> <telephoneNumber>415131</telephoneNumber> <userLocale>French France</userLocale>-<associatedDevices> <device>TCTbbrauntest04</device> </associatedDevices>-<primaryExtension>-<primaryExtension> <pattern>415131</pattern> <routePartitionName>p_international</routePartitionName> </primaryExtension> </primaryExtension>-<associatedGroups>-<userGroup> <name>Standard CCM End Users</name> </userGroup>-<userGroup> <name>Standard CTI Enabled</name> </userGroup> </associatedGroups> <enableCti>true</enableCti> <digestCredentials>bbraun</digestCredentials>-<phoneProfiles> <profileName>bbrauntest04</profileName> </phoneProfiles> <defaultProfile>bbrauntest04</defaultProfile> <enableMobility>true</enableMobility> <enableMobileVoiceAccess>true</enableMobileVoiceAccess> <primaryDevice>TCTbbrauntest04</primaryDevice>-<ctiControlledDeviceProfiles> <profileName>bbrauntest04</profileName> </ctiControlledDeviceProfiles> </axl:updateUser> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

    behaves as if everything is okay... but the primary extension has not been set (as confirmed by sending a getUser and querying the endusernumplanmap table).

    And while we're at getUser - here's a snippet from the response

    -<phoneProfiles> <profileName
    uuid="6dd05d57-c88d-e840-904f-be8cccb41593">bbrauntest04</profileName> </phoneProfiles> <defaultProfile
    uuid="6dd05d57-c88d-e840-904f-be8cccb41593">bbrauntest04</defaultProfile> <presenceGroupName
    uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence
    group</presenceGroupName>

    Note the different ways of writing uuids... all lowercase without curly braces versus all uppercase with curly braces.. For ctiControlledDeviceProfiles, we're also stuck with the lower case no braces syntax, while the rest of the guids use upper case with curly braces (user uuid, serviceProfile, etc.)

    @edit: I also tried a very simple update.. just sending uuid and primaryExtension... but it's still a nogo. The operation goes through, but does nothing. only writing the appropriate entry directly into endusernumplanmap  table has the desired effect