unsetting Primary Extension on End User account

Version 1
    This document was generated from CDN thread

    Created by: MIKE WILCOX on 22-04-2010 10:46:51 PM
    We wrote a utility to remove phones and lines associated with an end user. The problem we ran into was that if the end user account has the Primary Extension set, you can't remove the phone that has the Primary Extension DN assigned to it. Trying to use updateUser to set primaryExtension to null ( <primaryExtension></primaryExtension> ) or to < None > ( <primaryExtension>< None ></primaryExtension> ) did not work. There was no change on the End User account page.
     
    Thanks,
     
    Mike

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: David Staudt on 22-04-2010 11:44:13 PM
    What version of UCM are you seeing this with?
     
    I believe there is a corner case where it is not possible to clear/null a field with a value due to the way AXL interprets empty elements.  You may need to use executeSQLUpdate against the effected table to workaround this.  These corner cases are supposed to be resolved as of 8.0.

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: MIKE WILCOX on 23-04-2010 12:15:00 AM
    What version of UCM are you seeing this with?
     
    I believe there is a corner case where it is not possible to clear/null a field with a value due to the way AXL interprets empty elements.  You may need to use executeSQLUpdate against the effected table to workaround this.  These corner cases are supposed to be resolved as of 8.0.

     
    Dave,
     
    Sorry, should have had the version in the question. This is on 6.1.2, haven't tried it on 7.1.3 which is the other version in our environment.
     
    Thanks,
     
    Mike

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: David Staudt on 23-04-2010 02:42:43 PM
    Engineering suggests this issue was resolved as of 7.0...please give it a try on your 7.1(3) setup.

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: MIKE WILCOX on 23-04-2010 05:18:06 PM
    Dave,
     
    Tried with 7.1(3) and still no joy. Tried setting to NULL, < None >, 0, and without putting anything between the tags and still did not unset.
     
    Thanks,
     
    Mike

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: David Staudt on 25-04-2010 08:11:29 PM
    Hmm, doesn't sound good.  If you can attach the detailed level AXL logs we can take a closer look, perhaps open a defect.

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: MIKE WILCOX on 03-05-2010 09:27:59 PM
    As I was looking at the logs for this I saw an error saying I didn't terminate the <userid> correctly with </userid>. Looking in the code, I sure didn't. So now that my code is working I have to ask, why didn't CM return an error?
     
    Thanks,
     
    Mike
     
    User Request:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
    lns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org
    /2001/XMLSchema">




             <SOAP-ENV:Body>
           <updateUser>
            <userid>mjwilcox</pattern>
    <primaryExtension/>
    </updateUser>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    End of Request
    HTTP/1.1 200 OK
    Connection: close
    Date: Mon, 03 May 2010 20:45:10 GMT
    Server: Apache-Coyote/1.1
    Content-Length: 408
    Content-Type: text/xml;charset=utf-8
    Client-Date: Mon, 03 May 2010 20:45:10 GMT
    Client-Peer: 10.194.191.5:8443
    Client-Response-Num: 1
    Client-SSL-Cert-Issuer: /C=US/ST=CA/L=FM1 1D BQ50/O=IT NTS/OU=Publisher/CN=fm11d
    -bq50vcm1.fm.intel.com
    Client-SSL-Cert-Subject: /C=US/ST=CA/L=FM1 1D BQ50/O=IT NTS/OU=Publisher/CN=fm11
    d-bq50vcm1.fm.intel.com
    Client-SSL-Cipher: EDH-RSA-DES-CBC3-SHA
    Client-SSL-Warning: Peer certificate not verified
    Set-Cookie: JSESSIONIDSSO=5A5537E85DB968F582A2B638C9F0AF56; Path=/
    Set-Cookie: JSESSIONID=3026F938F056006D07584814A9C708D8; Path=/axl; Secure
    SOAPAction: 6.0

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SO
    AP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Heade
    r/><SOAP-ENV:Body><axl:updateUserResponse xmlns:axl="http://www.cisco.com/AXL/AP
    I/1.0" xmlns:xsi="http://www.cisco.com/AXL/API/1.0"><return>{56DA8A4D-761C-4A1E-
    A936-739A690A4562}</return></axl:updateUserResponse></SOAP-ENV:Body></SOAP-ENV:E
    nvelope>

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: MIKE WILCOX on 03-05-2010 10:13:00 PM
    Worked on both 6.1.2 and 7.1.3
     
    Mike

    Subject: RE: unsetting Primary Extension on End User account
    Replied by: David Staudt on 03-05-2010 10:06:59 PM
    I understand the AXL implementation does not use any automated or particularly strict schema validation mechanism on incoming requests (for performance reasons and because such didn't really exist when it was originally built), but that's letting serious badness slip while returning what looks like a success message.
     
    Did your operation end up working on 6.1(2)?