04-03-2022 05:22 PM - edited 04-03-2022 05:24 PM
I am getting an error when I try to post an ExecuteSQLQuery to update the Line Description on phones. Here is the XML:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5">
<soapenv:Header/>
<soapenv:Body>
<ns:executeSQLQuery>
<sql>update numplan set description = 'SHA2470 Customer Service 1200' where dnorpattern = '1200' and fkroutepartition = ( select pkid from routepartition where name = 'SHA2470-PHNDN_PT' )
</sql>
</ns:executeSQLQuery>
</soapenv:Body>
</soapenv:Envelope>
Here is the error returned:
<?xml version="1.0" encoding="UTF-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
-<soapenv:Body>
-<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>No UPDATE permission for numplan.</faultstring>
-<detail>
-<axlError>
<axlcode>-273</axlcode>
<axlmessage>No UPDATE permission for numplan.</axlmessage>
<request>executeSQLQuery</request>
</axlError>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I am able to update the description using AXL. Here is a script that works:
<?xml version="1.0" encoding="UTF-8"?>
<!--DTD generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
<!DOCTYPE data [
<!ELEMENT data (sql+)>
<!ELEMENT sql EMPTY>
<!ATTLIST sql
query CDATA #IMPLIED
update CDATA #IMPLIED
>
]>
<data>
<sql update="update numplan set description = 'SHA2470 Customer Service 1200' where dnorpattern = '1200' and fkroutepartition = ( select pkid from routepartition where name = 'SHA2470-PHNDN_PT' ) " />
</data>
I am also able to update the Description on the cli using this statement:
run sql update numplan set description = 'SHA2470 Customer Service 1200' where dnorpattern = '1200' and fkroutepartition = ( select pkid from routepartition where name = 'SHA2470-PHNDN_PT' )
The cli uses a different account but the Post and AXL are using the same account and credentials.
Also, when I add a phone or a line using XML the phone and line get added but the line description does not get updated. I'm checking the CUCM replication status on this cluster but do not know the results yet.
I'm able to Post other SQL queries fine but they only read data, not update data.
Thanks for any help you can offer!
Solved! Go to Solution.
04-03-2022 06:09 PM
I figured out the issue, </ns:executeSQLQuery> will only allow Queries. I changed it to </ns:executeSQLUpdate> and now it is working. I also had to change </ns:executeSQLQuery> to </ns:executeSQLUpdate> . A simple fix after I racked my brain for a while.
04-03-2022 06:09 PM
I figured out the issue, </ns:executeSQLQuery> will only allow Queries. I changed it to </ns:executeSQLUpdate> and now it is working. I also had to change </ns:executeSQLQuery> to </ns:executeSQLUpdate> . A simple fix after I racked my brain for a while.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide