getUser works on AXL7.1 but fails on 8.5

Version 1
    This document was generated from CDN thread

    Created by: Daniel Krenzel on 05-12-2011 01:31:52 PM
    The environment is a CUCM cluster version 8.5x. I have a script that works when I use the AXL 7.1 interface but fails with the 8.5 interface. See below for the POST and responses for each of the two cases - 7.1 (failure) followed by 8.5 (success). In the one case it finds the user in the other it doesn't. Am I missing some other necessary argument? I'm normally all over such issues but the API documentation leaves a lot to be desired, or maybe I don't have all the right docs. Anyhow, thanks, I appreciate any insight you might have.
     
    POST https://10.23.170.201:8443/axl/ HTTP/1.1
    Accept: text/xml
    Accept: multipart/*
    Accept: application/soap
    Content-Length: 366
    Content-Type: text/xml; charset=utf-8
    SOAPAction: CUCMB ver=7.1

    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
    g/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:so
    ap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><getUser xmlns="http:/
    /www.cisco.com/AXL/API/7.1"><userid xsi:type="xsd:string">scripting_appuser<
    /userid></getUser></soap:Body></soap:Envelope>


    HTTP/1.1 200 OK
    Connection: close
    Date: Mon, 05 Dec 2011 18:20:15 GMT
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Server:
    Content-Length: 947
    Content-Type: text/xml;charset=utf-8
    Client-Date: Mon, 05 Dec 2011 18:20:25 GMT
    Client-Peer: 10..10.10.10:8443
    Client-Response-Num: 1
    Client-SSL-Cert-Issuer: /CN=uslocation1p.company.corp/OU=IT/O=Company/L=Location1/ST=MN/C=US
    Client-SSL-Cert-Subject: /CN=uslocation1p.company.corp/OU=IT/O=Company/L=Location1/ST=MN/C=US
    Client-SSL-Cipher: AES256-SHA
    Client-SSL-Socket-Class: IO::Socket::SSL
    Client-SSL-Warning: Peer certificate not verified
    Set-Cookie: JSESSIONIDSSO=BD057EAF3BB3490FC4A55D04644EF9D7; Path=/; Secure
    Set-Cookie: JSESSIONID=FD72F9AEA56F4F0B2C8A5953F15FA228; Path=/axl; Secure
    SOAPAction: CUCMB ver=7.7.1

    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encod
    ing/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Heade
    r/><SOAP-ENV:Body><axl:getUserResponse xmlns:axl="http://www.cisco.com/AXL/API/7
    .1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><return><user><lastnam
    e/><userid>scripting_appuser</userid><password/><pin/><associatedDevices><de
    vice>SEP001BD4337B87</device></associatedDevices><passwordCredentials><pwdCredPo
    licyName>Default Credential Policy</pwdCredPolicyName><pwdCredUserCantChange>fal
    se</pwdCredUserCantChange><pwdCredUserMustChange>false</pwdCredUserMustChange><p
    wdCredDoesNotExpire>false</pwdCredDoesNotExpire><pwdCredTimeChanged>November 15,
     2011 14:51:50 CST</pwdCredTimeChanged><pwdCredTimeAdminLockout/><pwdCredLockedB
    yAdministrator>false</pwdCredLockedByAdministrator></passwordCredentials></user>
    </return></axl:getUserResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>


    _______________________________________________________________________________________


    POST https://10.23.170.201:8443/axl/ HTTP/1.1
    Accept: text/xml
    Accept: multipart/*
    Accept: application/soap
    Content-Length: 366
    Content-Type: text/xml; charset=utf-8
    SOAPAction: CUCMB ver=8.5

    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.or
    g/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:so
    ap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><getUser xmlns="http:/
    /www.cisco.com/AXL/API/8.5"><userid xsi:type="xsd:string">scripting_appuser<
    /userid></getUser></soap:Body></soap:Envelope>


    HTTP/1.1 500 Internal Server Error
    Connection: close
    Date: Mon, 05 Dec 2011 18:20:50 GMT
    Server:
    Content-Length: 465
    Content-Type: text/xml;charset=UTF-8
    Client-Date: Mon, 05 Dec 2011 18:21:02 GMT
    Client-Peer: 10.10.10.10:8443
    Client-Response-Num: 1
    Client-SSL-Cert-Issuer: /CN=uslocation1p.company.corp/OU=IT/O=Company/L=Location1/ST=MN/C=US
    Client-SSL-Cert-Subject: /CN=uslocation1p.company.corp/OU=IT/O=Company/L=Location1/ST=MN/C=US
    Client-SSL-Cipher: AES256-SHA
    Client-SSL-Socket-Class: IO::Socket::SSL
    Client-SSL-Warning: Peer certificate not verified
    Set-Cookie: JSESSIONIDSSO=6303D1C03DC1FD2964C29CC6EB3EE1F7; Path=/; Secure
    Set-Cookie: JSESSIONID=D64E8BB3C260DD5F3D0508ED6D486982; Path=/axl; Secure

    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://sc
    hemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapen
    v:Server</faultcode><faultstring>Item not valid: The specified User was not foun
    d</faultstring><detail><axlError><axlcode>5007</axlcode><axlmessage>Item not val
    id: The specified User was not found</axlmessage><request>getUser</request></axl
    Error></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

    Subject: RE: getUser works on AXL7.1 but fails on 8.5
    Replied by: Daniel Krenzel on 05-12-2011 02:14:32 PM
    NOTE: where I wrote:

    "See below for the POST and responses for each of the two cases - 7.1 (failure) followed by 8.5 (success)"

    Should have been:

    "See below for the POST and responses for each of the two cases - 7.1 (success) followed by 8.5 (failure)"

    Subject: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Administ
    Replied by: Sascha Monteiro on 06-12-2011 06:44:55 AM
    You should not have to add any of that in the userid, <userid>scripting_appuser</userid>
    Should do the trick

    Sent from my iPhone4

    On 06/12/2011, at 22:29, Cisco Developer Community Forums <cdicuser@developer.cisco.com> wrote:

    > Dan-Anders Hook has created a new message in the forum "Administration XML Questions":
    >
    > --------------------------------------------------------------
    > Hi,
    >
    > I 8.5 the userid must be unqualified, i.e:
    >
    > <?xml version="1.0" encoding="UTF-8"?>
    > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    > <soap:Body>
    > <getUser xmlns="http://www.cisco.com/AXL/API/8.5">
    > <userid xmlns="" xsi:type="xsd:string">scripting_appuser</userid>
    > </getUser>
    > </soap:Body>
    > </soap:Envelope>
    >
    > note the xmlns="" in the userid tag.
    >
    > Kind regards,
    >
    > //Dan
    > --
    > To respond to this post, please click the following link:
    >
    > <http://developer.cisco.com/web/axl/forums/-/message_boards/view_message/4854767>
    >
    > or simply reply to this email.

    Subject: RE: getUser works on AXL7.1 but fails on 8.5
    Replied by: Dan-Anders Hook on 06-12-2011 06:29:42 AM
    Hi,

    I 8.5 the userid must be unqualified, i.e:

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <getUser xmlns="http://www.cisco.com/AXL/API/8.5">
          <userid xmlns="" xsi:type="xsd:string">scripting_appuser</userid>
        </getUser>
      </soap:Body>
    </soap:Envelope>

    note the xmlns="" in the userid tag.

    Kind regards,

    //Dan

    Subject: RE: getUser works on AXL7.1 but fails on 8.5
    Replied by: Dan-Anders Hook on 06-12-2011 06:55:35 AM
    Hi,

    That does not work for me... Can't say that I understand the XML namespacing very well, but it seems the xmlns must be "blanked" in order for it to work:


    Works:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <getUser xmlns="http://www.cisco.com/AXL/API/8.5">
          <userid xmlns="">scripting_appuser</userid>
        </getUser>
      </soap:Body>
    </soap:Envelope>

    Does not work:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <getUser xmlns="http://www.cisco.com/AXL/API/8.5">
          <userid>scripting_appuser</userid>
        </getUser>
      </soap:Body>
    </soap:Envelope>

    Kind regards,

    //Dan

    Subject: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Administ
    Replied by: Sascha Monteiro on 06-12-2011 03:24:55 PM
    this works;

    <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:getUser xmlns:axl="http://www.cisco.com/AXL/API/8.5"  xsi:schemaLocation="http://www.cisco.com/AXL/API/8.5 http://ccmserver/schema/axlsoap.xsd" xsi:type="XRequest" sequence="1234">
    <userid>devuser414</userid>
    </axl:getUser>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Subject: RE: Re: New Message from Dan-Anders Hook in Administration XML (AXL) - Admi
    Replied by: Daniel Krenzel on 06-12-2011 04:26:21 PM
    Thanks everyone - indeed what's below does work. To implement it in this manner I ended up scrapping SOAP::Lite - I didn't really care for the module, it was taking more work to instruct it to *not* do certain things than it would to just build the request at a lower level.
     
    this works;

    <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:getUser xmlns:axl="http://www.cisco.com/AXL/API/8.5"  xsi:schemaLocation="http://www.cisco.com/AXL/API/8.5 http://ccmserver/schema/axlsoap.xsd" xsi:type="XRequest" sequence="1234">
    <userid>devuser414</userid>
    </axl:getUser>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>