CUCM 6.13 - How to build SOAP Message for executeSQLQuery

Version 1
    This document was generated from CDN thread

    Created by: Keith Lunn on 28-06-2009 03:05:15 PM
    We are using CUICM 6.13 and the closest devleoper guide I can find is 6.01. It shows a SOAP message example for executeSQLQuery in C.(pg 1-14). There is also an example for "getphone" in Java (pg 1-17). I have noticed the SOAP message is being built differently in each example, (understanding that one is executeSQLQuery" and the other is "getphone".
    Now on pg 1-19 they have a paragraph "Using executeSQLQuery" and that has again a different way of building the SOAP message - so I am very confused on which method to follow....
    Differences noted:
    axl sequence number placed in different locations
    xmlns info in different parts of soap message: envelope vs body
    m:executeSQLQuery vs axlapi:executeSQLQuery
    C Example pg1-14:
    strAXLRequest = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=";
    strAXLRequest += "\"\"";
    strAXLRequest += " xmlns:SOAP-ENC=\"\"";
    strAXLRequest += " xmlns:xsi=\"\"";
    strAXLRequest += " xmlns:xsd=\"\"> ";
    strAXLRequest += "<SOAP-ENV:Body> ";
    strAXLRequest += "<m:executeSQLQuery xmlns:m=\"\"
    sequence=\"" + seqNum + "\"> ";
    strAXLRequest += "<m:sql> ";
    strAXLRequest += "SELECT * FROM Device ";
    strAXLRequest += "</m:sql> ";
    strAXLRequest += "</m:executeSQLQuery> ";
    strAXLRequest += "</SOAP-ENV:Body> ";
    strAXLRequest += "</SOAP-ENV:Envelope>";
    Java example pg 1-17:
    // Build the SOAP payload
    sAXLRequest = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"\" ";
    sAXLRequest += "xmlns:xsi=\"\"
    xmlns:xsd=\"\"> ";
    sAXLRequest += "<SOAP-ENV:Body> <axl:getPhone xmlns:axl=\"\" ";
    sAXLRequest += " xsi:schemaLocation=\" http://
    ccmserver/schema/axlsoap.xsd\" ";
    sAXLRequest += "sequence=\"1234\"> SEP000000000009";
    sAXLRequest += "</axl:getPhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>";
    Using executeSQLQuery - pg 1-19:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="">
    <axlapi:executeSQLQuery sequence="1"
    xsi:schemaLocation=" axlsoap.xsd">
    <sql>SELECT * from numplan</sql>


    Subject: RE: CUCM 6.13 - How to build SOAP Message for executeSQLQuery
    Replied by: Keith Lunn on 06-07-2009 06:44:25 PM
    According to TAC:
    The dopcumentation does have descrepancies on building the SOAP Message and the recommended format is:
    This is a discrepancy in the request headers in the tool kit sample client. This does not affect the AXL response. We have plans to provide new sample client codes for different platforms (.NET, AXIS, perl) in 8.0.
    Also, the sequence attribute should come in the Body. BY the way, I will be raising a defect for changing the documentation in versions prior to 8.0.
    This is a sample request generated by a tool called SOAP UI which can be downloaded for free. This generates AXL requests from the WSDL and schema. This will generate the requests with appropriate namespaces defined in the schema itself. As a proper coding guideline, you can follow this request format.
    <soapenv:Envelope xmlns:soapenv="" xmlns:ns="">
          <ns:executeSQLQuery sequence="?">
             <sql>select * from timeschedule</sql>

    Subject: RE: CUCM 6.13 - How to build SOAP Message for executeSQLQuery
    Replied by: Keith Lunn on 07-07-2009 05:10:35 PM
    THe SOAP format that TAC gave me did not work - gave axl soap error, i corrected and informed TAC what the correction is.
    Here's the standrad using cucm 6.13:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=""
     <ns:executeSQLQuery sequence="600">
      SELECT numplan.dnorpattern, r, callforwarddynamic.cfavoicemailenabled, callforwarddynamic.c
    fadestination FROM numplan,routepartition,callforwarddynamic WHERE routepartitio
    n.pkid = numplan.fkroutepartition AND callforwarddynamic.fknumplan = numplan.pki
    d and like 'CL_DNPT%' AND (callforwarddynamic.cfavoicemailen
    abled = 't' OR callforwarddynamic.cfadestination != '');
    They have also opened a BUG ID to get their documentation descrepacies in the Developers Guide update too:
    I have raised a bug for correcting the documentation, highlighting all the discrepancies pointed by you, the defect Id is: CSCta56315