Defining CM DB Version in SoapAction Header

Version 1
    This document was generated from CDN thread

    Created by: Martin Sloan on 22-11-2011 10:09:31 AM
    I'm running into an issue when trying to use the 'addUserPhoneAssociation' operation and the error indicates to me that I probably need to specify the DB version of our CUCM (8.5) in the SOAPAction header.  The parameters that I'm setting in the Perl script for SOAP messages are:
    my $cucmip = "";
    my $axl_port = "8443";
    my $user = "axluser";
    my $password = "password";
    my $axltoolkit = "AXLAPI.wsdl";

    BEGIN {
        sub SOAP::Transport::HTTP::Client::get_basic_credentials {
    return ($user => $password)

    my $cm = new SOAP::Lite
        encodingStyle => '',
        uri => "$axltoolkit",
        proxy => "https://$cucmip:$axl_port/axl/" ;
    The error I'm receiving is 'Failed to read schema document '/usr/local/thirdparty/jakarta-tomcat/webapps/axl/schema/6.1/SoapEnvelope.xsd'', which I believe I'm getting because CUCM is using the default version 6.1.  When tracing the messages,  I see the CUCM list SOAPAction: CUCMB ver=6.1.  I've tried to update the SOAP action header in my messaging to '' (and also tried 8.0) but I receive the same error and the CUCM SOAPAction stays at 6.1.  I'm relatively new to SOAP/Perl scripts so if anyone has a suggestion on how to correctly update the SOAPAction header it would be appreciated.
    Thank you,

    Subject: RE: Defining CM DB Version in SoapAction Header
    Replied by: Dan-Anders Hook on 29-11-2011 04:00:32 PM

    Which AXLAPI.wsdl and AXLSoap.xsd are you using? Try with the latest wsdl, you can download it from your CUCM under applications.

    Kind regards,


    Subject: RE: Defining CM DB Version in SoapAction Header
    Replied by: Martin Sloan on 01-12-2011 10:39:28 AM
    Hi Dan,

    Thanks for replying.  I guess I'm not completely sure which wsdl is being used....  I've downloaded the 8.5(1) Admin XML Interface Specs and use that as my reference when building the scripts and also have the AXLAPI.wsdl and AXLSoap.xsd downloaded but I'm not completely clear on how to reference the specific files from the script.  I've run into another issue with updating the subscribeCallingSearchSpaceName under updateUser, which I've read wasn't available until 8.0 so I'm most likely hitting this wall again.  Here's a little snip of the trace from my script:

    My message to CUCM:

    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap=""><soap:Body><updateUser xmlns=""><userid xsi:type="xsd:int">387653</userid><presenceGroupName xsi:type="xsd:string">TestGroup</presenceGroupName><subscribeCallingSearchSpaceName xsi:type="xsd:string">GLB-PRESENCE_SUBSCRIBE-CSS</subscribeCallingSearchSpaceName></updateUser></soap:Body></soap:Envelope>

    CUCM Response:

    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="" xmlns:SOAP-ENV=""><SOAP-ENV:Header/><SOAP-ENV:Body><axl:updateUserResponse xmlns:axl="" xmlns:xsi=""><return>{AF7D7A2A-BAF5-41A1-9CF1-E8DDD9121D8D}</return></axl:updateUserResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

    The request *seems* to be trying to use 8.5 but the reply lists 6.1.  I'm not sure if this is a standard reply or the root of my issues.  I don't get an error on this one, just the UUID of the end user I'm trying to update.  There are some fundamentals that I'm obviously missing here :-|  Any help is appreciated!



    Subject: RE: Defining CM DB Version in SoapAction Header
    Replied by: Dan-Anders Hook on 01-12-2011 02:40:18 PM

    Ah, Ok. Sorry, I did not really look at your code at first, I just saw the "AXLAPI.wsdl" in there. I doubt that SOAP::Lite can parse that monstruos wsdl. Even if it could I don't think that is how you do it in SOAP::Lite.

    You did not post your whole code, but I'm guessing you have two problems. First of all I think your action header contains the wrong value. That is probably why CUCM responds with version 6.1. I thought 7.0 was the oldest API that worked with 8.5, at least that's what the XML dev guide says... The older API's did not really care about the namespaces that much so that's why you don't get any complaints about the 8.5 in there.
    Second, which is visible in the XML, is that the userid etc should be unbounded i.e not in a namespace. According to the AXL docs it's only valid to send uuid for presenceGroup and subscribeCSS, but it works with name to.

    The return value is quite often an UUID. When you receive that it indicates that the operation was successful. In this case it clearly was not, so you should have received an error. Since you were talking to an older API version I would'nt think to much about it.

    Here's quick sample that works in my 8.6 lab. Hops this helps!

     3use warnings;
     4use strict;
     5use SOAP::Lite;
     6use Data::Dumper;
    10my $debug = 1;
    11my $cucmip = "";
    12my $axl_port = "8443";
    13my $user = "administrator";
    14my $password = "cisco";
    15my $ver = "8.5";
    16my $axltoolkit = "$ver";
    18use SOAP::Lite +trace => 'debug';
    20BEGIN {
    21  sub SOAP::Transport::HTTP::Client::get_basic_credentials {
    22    return ($user => $password)
    23  };
    25my $cm = SOAP::Lite
    26    -> encodingStyle('')
    27    -> on_action(sub { return "CUCM:DB ver=$ver" })
    28    -> proxy("https://$cucmip:$axl_port/axl/")
    29    -> uri("$ver");
    31#axl request
    32my $res =  $cm->updateUser( SOAP::Data->attr({xmlns => ''})->name("userid" => "dahook"),
    33                        =>  SOAP::Data->attr({xmlns => ''})->name("presenceGroupName" => "Test"),
    34                        =>  SOAP::Data->attr({xmlns => ''})->name("firstName" => "Test"),
    35                        =>  SOAP::Data->attr({xmlns => ''})->name("subscribeCallingSearchSpaceName" => "CSS_Test")
    36                          );
    37unless ($res->fault) {
    38  print $res->valueof('//updateUserResponse/return');
    39  print "\n";
    40  $Data::Dumper::Indent = 3;
    41  print Dumper($res->paramsall()) if ( $debug==1);
    44 else {
    45        print join ', ',
    46        $res->faultcode,
    47        $res->faultstring;

    All the best,


    Subject: RE: Defining CM DB Version in SoapAction Header
    Replied by: Dan-Anders Hook on 01-12-2011 02:47:46 PM

    Just for reference, here is the request/response from the script above:


    Just for reference, here is the request/response from the script above:

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

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
      <updateUser xmlns="">
       <userid xmlns="" xsi:type="xsd:string">dahook</userid>
       <presenceGroupName xmlns="" xsi:type="xsd:string">Test</presenceGroupName>
       <firstName xmlns="" xsi:type="xsd:string">Test</firstName>
       <subscribeCallingSearchSpaceName xmlns="" xsi:type="xsd:string">CSS_Test</subscribeCallingSearchSpaceName>

    HTTP/1.1 200 OK
    Connection: close
    Date: Thu, 01 Dec 2011 19:32:16 GMT
    Content-Length: 308
    Content-Type: text/xml;charset=UTF-8
    Client-Date: Thu, 01 Dec 2011 19:32:15 GMT
    Client-Response-Num: 1
    Client-SSL-Cert-Issuer: /C=SE/O=lab/OU=lab/CN=cucm1/ST=lab/L=lab
    Client-SSL-Cert-Subject: /C=SE/O=lab/OU=lab/CN=cucm1/ST=lab/L=lab
    Client-SSL-Cipher: AES256-SHA
    Client-SSL-Socket-Class: IO::Socket::SSL
    Client-SSL-Warning: Peer certificate not verified
    Set-Cookie: JSESSIONIDSSO=CD97AF241827DD4B78F90D969460C94C; Path=/; Secure
    Set-Cookie: JSESSIONID=B296F2E8C8C32221E7A3FDAB12AA8285; Path=/axl; Secure

    <?xml version='1.0' encoding='utf-8'?>
    <soapenv:Envelope xmlns:soapenv="">
      <ns:updateUserResponse xmlns:ns="">

    Subject: RE: Defining CM DB Version in SoapAction Header
    Replied by: Martin Sloan on 13-12-2011 10:32:28 AM
    Hi Dan,

    Thanks again for some great advice.  I'm able to update the fields using the info you provided.  I'm running into issues with namespaces for sure.  I know you replied to another post that I had and I'm sure it's all related to this.  If I use the messaging above I can update the presence info but some fields that I was able to update before, like "enableCTI", don't update.  I've just split out the messages as a workaround while I read through more docs on SOAP/XML and namespaces.....