getIpPhoneServices Request not working in CUCM V8

Version 1
    This document was generated from CDN thread

    Created by: Aaron Graham on 17-06-2011 10:38:12 AM
    Hi All,
    Am trying to add Extenstion Mobility service to the CUCM using AXL. I usally start these developements by adding things in using the web interface and then doing an axl getXXXXXXX request and capturing the response.
    I then reverse engineer the response and turn it into an addXXXXXXXX request by making the appropriated changes as prescribed by the axlsoap.xsd etc.
     
    Well the getIpPhoneServices AXL request is resulting in that classic 5000 error:
     
    <detail>
       <axl:Error xmlns:axl="http://www.cisco.com/AXL/API/1.0">
         <axl:code>5000</axl:code>
         <axl:message>Error</axl:message>
         <request>getIpPhoneServices</request>
       </axl:Error>
    </detail>
     
     
    By the way thanks Cisco for such a great error message, F'kin swisswatch.
     
    Any ideas on why the getIpPhoneServices (which is in the axlsoap.xsd taken off the CUCM version 8 itself), would be not doing its job?
     
    By the way you get 5000 code when the CUCM doesn't recognise the request. eg if I tried a getGoatsName request.
     
     
    Thanks in advance,
    Aaron
     

    Subject: Re: New Message from Aaron Graham in Administration XML (AXL) - Administrat
    Replied by: Sascha Monteiro on 19-06-2011 05:12:17 AM
    hi,

    1. post your xml please
    2. have you read 8.0(1) Cisco Unified Communications Manager Admin XML Interface Spec, it has all xml you require

    Subject: RE: Re: New Message from Aaron Graham in Administration XML (AXL) - Adminis
    Replied by: Aaron Graham on 20-06-2011 03:50:37 AM
    Hi,
    Thanks for your response.
    Prior to issuing the following AXL request, I had already added a phone service called "Extension mobility" to the CUCM in question. I have even used the service and it worked across clusters, so I know it has been added correctly. The following request should have responded with the details of the "Extension mobility" service.
     
    Also attached are two screen shot images showing my development tool which I have used for over a year now (so I know the HTTPS/SOAP side of things are good) and a XML spy diagram showing the request's structure as documented in the xsd I downloaded from the CUCM V8. Note the only "must have" tag is the serviceName/uuid.
     
    Aaron
    Request:
    <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:getIpPhoneServices xmlns:axl="http://www.cisco.com/AXL/8.0" xsi:schemaLocation="http://www.cisco.com/AXL/8.0 http://ccmserver/schema/axlsoap.xsd" sequence="2345">
      <serviceName>Extension mobility</serviceName>
     </axl:getIpPhoneServices>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope> 

    Response:
    HTTP/1.1200OKSet-Cookie:JSESSIONIDSSO=B7B483DFCE162BB8DB24DBB7E8FB2BDC;Path=/;SecureSet-Cookie:JSESSIONID=1D729C416F79CBEB39AC1E020F85636B;Path=/axl;SecureAccept:text/xml,text/html,image/gif,image/jpeg,*;q=.2,*/*;q=.2SOAPAction:CUCMBver=6.1Content-Type:text/xml;charset=utf-8Content-Length:496Date:Mon,20Jun201106:22:49GMTServer:
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
     <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Client</faultcode>
      <faultstring>Error</faultstring>
      <detail>
       <axl:Error xmlns:axl="http://www.cisco.com/AXL/API/1.0">
        <axl:code>5000</axl:code>
        <axl:message>Error</axl:message>
        <request>getIpPhoneServices</request>
       </axl:Error>
      </detail>
     </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Subject: RE: Re: New Message from Aaron Graham in Administration XML (AXL) - Adminis
    Replied by: Aaron Graham on 22-06-2011 11:56:05 AM
    I found the solution through trial and error (which is the story of our development life in regard to CUCM AXL).
    The initial HTTPS header that I developed a year ago didn't include the line: 
    "SOAPAction: "CUCM DB ver=7.0"
    This was because I found it wasn't needed for all of the calls I used and after I finally got something to work, I was reluctant to alter anything as it took so long to get things going in the first instance.
     
    8 months later, after many AXL requests having been developed, we upgraded to CUCM 8.0(2). All of the previously devlopment AXL were tested and it was found that all worked without any modifications being required (to either the HTTPS header or the AXL payload). So for example the following still worked even with the AXL/7.0 in the XML attribute "sequence" for the request:
    <axl:addLocation xmlns:axl="http://www.cisco.com/AXL/7.0" xsi:schemaLocation="http://www.cisco.com/AXL/7.0 http://ccmserver/schema/axlsoap.xsd" sequence="22">
      <name>Stevenage</name>
      <kbits>125</kbits>
      <videoKbits>-1</videoKbits>
    </axl:addLocation>
     
     However getIpPhoneService etc only became available in CUCM V8.0 onwards. And from reading carefully the section "AXL Versioning Support" in the Cisco Unified Communications Manager XML Developers Guide I noticed the following warning:
     

    Cisco highly recommends that developers include the version of AXL schema on which an AXL request is based because support for unversioned requests might be removed in future releases of Unified CM.
     
    Reading this started me thinking that the problem could be related to the correct CUCM D B version specification being required.
    So I updated my HTTPS header generation code to use:
     
    "SOAPAction: "CUCM DB ver=8.0"
    and I then found that when I tried to call the getIpPhoneServices with the http://www.cisco.com/AXL/7.0" attribute, would get a
    HTTP/1.1 500 (HTTP 500 Internal Service Fault) error.

    Finally I updated the SOAP/AXL payload to include a matching version attribute "sequence" string of:
    xmlns:axl="http://www.cisco.com/AXL/API/8.0"

    Note the added /API/ was needed also.

    After that the new add/updated/get/remove IpPhoneServices seem to be working fine.

    One last point: The 5000 error code is actually an "Unknown Error" fault. It doesn't necessary mean (as I alluded to in one of my previous posts) unrecognised request situation.