cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
900
Views
0
Helpful
9
Replies
Highlighted
Beginner

addRoutePattern getting axlcode response -1

Hi All,

I am trying to create a route pattern via the AXL api (CUCM 10.5) and I am getting a -1 return code.

Request:

<soapenv:Envelope xmlns:ns="http://www.cisco.com/AXL/API/10.5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Header/>

<soapenv:Body>

  <ns:addRoutePattern>

  <pattern>12345</pattern>

  <routePartitionName>PT-Test</routePartitionName>

  <blockEnable>false</blockEnable>

  <useCallingPartyPhoneMask>Off</useCallingPartyPhoneMask>

  <dialPlanName/>

  <digitDiscardInstructionName/>

  <networkLocation>OnNet</networkLocation>

  <prefixDigitsOut/>

  <routeFilterName/>

  <provideOutsideDialtone>false</provideOutsideDialtone>

  <destination>

  <routeListName>RL-Test</routeListName>

  </destination>

  </ns:addRoutePattern>

</soapenv:Body>

</soapenv:Envelope>

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Body>

<soapenv:Fault>

  <faultcode>soapenv:Server</faultcode>

  <faultstring></faultstring>

  <detail>

  <axlError>

  <axlcode>-1</axlcode>

  <axlmessage></axlmessage>

  <request>addRoutePattern</request>

  </axlError>

  </detail>

</soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

If anyone can post a working addRoutePattern request that would be good. It seems on the backend a java stack trace has been generated. It's most likely that my xml request is incorrect so any help would be very appreciated.

Thanks in advance.

-Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: addRoutePattern getting axlcode response -1

This (similar) request worked for me.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

<soapenv:Header/>

   <soapenv:Body>

  <ns:addRoutePattern sequence="?">

  <routePattern>

          <pattern>1234</pattern>

          <routePartitionName>Global Learned E164 Numbers</routePartitionName>

          <blockEnable>false</blockEnable>

  <useCallingPartyPhoneMask>Off</useCallingPartyPhoneMask>

  <dialPlanName/>

  <digitDiscardInstructionName/>

  <networkLocation>OnNet</networkLocation>

  <prefixDigitsOut/>

  <routeFilterName/>

  <provideOutsideDialtone>false</provideOutsideDialtone>

  <destination>

  <routeListName>Test_RouteList</routeListName>

  </destination>

  <networkLocation>OnNet</networkLocation>

         </routePattern>

      </ns:addRoutePattern>

   </soapenv:Body>

</soapenv:Envelope>

Looks like yours is missing <routePattern>...</routePattern>

View solution in original post

9 REPLIES 9
Highlighted
Cisco Employee

Re: addRoutePattern getting axlcode response -1

This (similar) request worked for me.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

<soapenv:Header/>

   <soapenv:Body>

  <ns:addRoutePattern sequence="?">

  <routePattern>

          <pattern>1234</pattern>

          <routePartitionName>Global Learned E164 Numbers</routePartitionName>

          <blockEnable>false</blockEnable>

  <useCallingPartyPhoneMask>Off</useCallingPartyPhoneMask>

  <dialPlanName/>

  <digitDiscardInstructionName/>

  <networkLocation>OnNet</networkLocation>

  <prefixDigitsOut/>

  <routeFilterName/>

  <provideOutsideDialtone>false</provideOutsideDialtone>

  <destination>

  <routeListName>Test_RouteList</routeListName>

  </destination>

  <networkLocation>OnNet</networkLocation>

         </routePattern>

      </ns:addRoutePattern>

   </soapenv:Body>

</soapenv:Envelope>

Looks like yours is missing <routePattern>...</routePattern>

View solution in original post

Highlighted
Beginner

Re: addRoutePattern getting axlcode response -1

Worked perfectly. Thanks heaps.

-Daniel

Highlighted
Beginner

Re: addRoutePattern getting axlcode response -1

What version of 10.5 are you running? I am using 10.5.1.10000-7 and getting an axlcode response -691.

Highlighted
Cisco Employee

Re: addRoutePattern getting axlcode response -1

We're running the same version.  Is this a new problem that occurred after it worked? 

Highlighted
Beginner

Re: addRoutePattern getting axlcode response -1

No I have never been able to get the add route pattern to work. I am trying to develop the script and am testing it on a freshly installed CUCM server.I am however pushing the soap query using PHP so they are arrays on my side however I have been able to run several other AXL elements to work without issue.

Here is some more of the error that I am getting.

[message:protected] => Missing key in referenced table for referential constraint (informix.fk_numplan_fkdialplan).

Highlighted
Rising star

Re: addRoutePattern getting axlcode response -1

error -1 generally means something is wrong with your xml.. it is valid xml, but doesn't conform to the structure CUCM expects (at least that's my experience with error -1).

As for teh missing key in referenced table.. have you tried looking at the axl traces? (increase the level to debug).. that'll show you the sql queries that are executed behind and should give you a hint. You'll see some kind of insert statement that needs further analysis.

Highlighted
Beginner

Re: addRoutePattern getting axlcode response -1

Thank you for the idea StephanI however I took a look at the axl traces and nothing seems to jump out at me. I am hoping you wouldn't mind taking a look.

Thank you in advance.

2015-02-26 17:32:59,576 INFO  [http-bio-443-exec-19] filters.TimingFilter - Request 1424753460142 was processed in 20ms

2015-02-26 17:32:59,583 INFO  [http-bio-443-exec-7] filters.TimingFilter - Received request 1424753460143 from appadmin at IP 172.16.16.245

2015-02-26 17:32:59,584 INFO  [http-bio-443-exec-7] servletRouters.AXLAlpha - Going to axis--->

2015-02-26 17:32:59,584 INFO  [http-bio-443-exec-7] servletRouters.AXLAlpha - AXL REQUEST :

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.cisco.com/AXL/API/10.5"><SOAP-ENV:Body><ns1:addRoutePattern><routePattern><pattern>0.1[2-9]XX[2-9]XXXXXX</pattern><description>Long Distance PSTN</description><routePartitionName uuid="{C0300070-1B84-E6E0-9C12-B3A7AD06B5A7}"/><blockEnable>false</blockEnable><useCallingPartyPhoneMask>On</useCallingPartyPhoneMask><dialPlanName></dialPlanName><digitDiscardInstructionName></digitDiscardInstructionName><networkLocation>OnNet</networkLocation><prefixDigitsOut></prefixDigitsOut><routeFilterName></routeFilterName><provideOutsideDialtone>false</provideOutsideDialtone><destination><routeListName uuid="{79717A73-2996-C571-98B1-E678FD4A9D9D}"/></destination></routePattern></ns1:addRoutePattern></SOAP-ENV:Body></SOAP-ENV:Envelope>

2015-02-26 17:32:59,637 ERROR [http-bio-443-exec-7] axlapiservice.AXLAPIServiceSkeleton - SQL EXCEPTION has occurred, will be sending you the exact error Info

2015-02-26 17:32:59,638 INFO  [http-bio-443-exec-7] axlapiservice.AXLCallFlow - sqlString is : select name from typedberrors where enum=Missing key in referenced table for referential constraint (informix.fk_numplan_fkdialplan).

2015-02-26 17:32:59,638 INFO  [http-bio-443-exec-7] axlapiservice.AXLCallFlow - errorCodeString is : Missing key in referenced table for referential constraint (informix.fk_numplan_fkdialplan).

2015-02-26 17:32:59,639 ERROR [http-bio-443-exec-7] axlapiservice.AXLCallFlow - com.cisco.www.axlapiservice.AXLAPIServiceSkeleton@2b96a6

java.sql.SQLException: A syntax error has occurred.

  at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)

  at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3127)

  at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3407)

  at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2324)

  at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2249)

  at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1485)

  at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1465)

  at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:210)

  at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:1237)

  at com.informix.jdbc.IfxStatement.executeQuery(IfxStatement.java:220)

  at com.cisco.ccm.dbl.Connector.executeQuery(Connector.java:1146)

  at com.cisco.www.axlapiservice.AXLCallFlow.getSOAPError(AXLCallFlow.java:111)

  at com.cisco.www.axlapiservice.AXLAPIServiceSkeleton.addRoutePattern(AXLAPIServiceSkeleton.java:15890)

  at com.cisco.www.axlapiservice.AXLAPIServiceMessageReceiverInOut.addRoutePattern(AXLAPIServiceMessageReceiverInOut.java:17402)

  at com.cisco.www.axlapiservice.AXLAPIServiceMessageReceiverInOut.invokeBusinessLogic(AXLAPIServiceMessageReceiverInOut.java:2578)

  at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)

  at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)

  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)

  at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)

  at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)

  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)

  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)

  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)

  at com.cisco.www.servletRouters.AXLAlpha.forwardToAxis(AXLAlpha.java:175)

  at com.cisco.www.servletRouters.AXLAlpha.doPost(AXLAlpha.java:62)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.cisco.www.servletRouters.filters.ThrottlingFilter.doFilter(ThrottlingFilter.java:66)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.cisco.vos.platform.tomcat.valves.CiscoResponseHeaderFilter.doFilter(Unknown Source)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.cisco.www.servletRouters.filters.NormalizeHeaderFilter.doFilter(NormalizeHeaderFilter.java:50)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.cisco.www.servletRouters.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:57)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.cisco.www.servletRouters.filters.TimingFilter.doFilter(TimingFilter.java:41)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

  at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:341)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

  at java.lang.Thread.run(Thread.java:744)

Caused by: java.sql.SQLException

  at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)

  at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3412)

  ... 61 more

2015-02-26 17:32:59,640 INFO  [http-bio-443-exec-7] axlapiservice.AXLCallFlow - Exception occured while  querying the database : java.sql.SQLException: Missing key in referenced table for referential constraint (informix.fk_numplan_fkdialplan).

2015-02-26 17:32:59,647 INFO  [http-bio-443-exec-7] filters.TimingFilter - Request 1424753460143 was processed in 64ms

2015-02-26 17:32:59,740 DEBUG [Thread-87] cnf.AXLCNFListener - Received CNF

2015-02-26 17:32:59,741 DEBUG [Thread-87] cnf.AXLCNFListener - Inserting CNF for table 'device', Action 'i' into processing queue.

2015-02-26 17:32:59,741 DEBUG [Thread-87] cnf.AXLCNFListener - Done inserting CNF into queue.

2015-02-26 17:32:59,741 DEBUG [Thread-88] cnf.CNFWorker - Got ChangeNotification from queue for table 'device' with action 'i'

2015-02-26 17:32:59,741 DEBUG [Thread-88] cnf.CNFWorker - Found matching filter; handler: RouteList

2015-02-26 17:32:59,741 DEBUG [Thread-88] cnf.CNFWorker - Completed CNF processing for table: device

2015-02-26 17:32:59,741 DEBUG [Thread-88] cnf.CNFWorker - Processing queue has 0 pending ChangeNotification objects.

2015-02-26 17:32:59,743 DEBUG [Thread-87] cnf.AXLCNFListener - Received CNF

2015-02-26 17:32:59,743 DEBUG [Thread-87] cnf.AXLCNFListener - Inserting CNF for table 'device', Action 'u' into processing queue.

2015-02-26 17:32:59,743 DEBUG [Thread-87] cnf.AXLCNFListener - Done inserting CNF into queue.

2015-02-26 17:32:59,743 DEBUG [Thread-88] cnf.CNFWorker - Got ChangeNotification from queue for table 'device' with action 'u'

2015-02-26 17:32:59,744 DEBUG [Thread-88] cnf.CNFWorker - Found matching filter; handler: RouteList

2015-02-26 17:32:59,744 DEBUG [Thread-88] cnf.CNFWorker - Completed CNF processing for table: device

2015-02-26 17:32:59,744 DEBUG [Thread-88] cnf.CNFWorker - Processing queue has 0 pending ChangeNotification objects.

2015-02-26 17:32:59,745 DEBUG [Thread-87] cnf.AXLCNFListener - Received CNF

2015-02-26 17:32:59,745 DEBUG [Thread-87] cnf.AXLCNFListener - Inserting CNF for table 'routelist', Action 'i' into processing queue.

2015-02-26 17:32:59,745 DEBUG [Thread-87] cnf.AXLCNFListener - Done inserting CNF into queue.

2015-02-26 17:32:59,745 DEBUG [Thread-88] cnf.CNFWorker - Got ChangeNotification from queue for table 'routelist' with action 'i'

2015-02-26 17:32:59,745 INFO  [Thread-88] daos.DeviceDAO - SELECT Device.tkDeviceProtocol AS t0_tkDeviceProtocol, Device.tkClass AS t0_tkClass, Device.tkModel AS t0_tkModel, Device.tkProtocolSide AS t0_tkProtocolSide, Device.tkDeviceProfile AS t0_tkDeviceProfile, Device.tkPreemption AS t0_tkPreemption, Device.tkProduct AS t0_tkProduct FROM Device WHERE Device.pkid = ?

2015-02-26 17:32:59,747 DEBUG [Thread-88] beans.SqlUtil - The sql query took 1ms

2015-02-26 17:32:59,747 DEBUG [Thread-88] beans.SqlUtil - The reflection and reading the result set took 0ms

2015-02-26 17:32:59,747 DEBUG [Thread-88] cnf.CNFWorker - Completed CNF processing for table: routelist

2015-02-26 17:32:59,747 DEBUG [Thread-88] cnf.CNFWorker - Processing queue has 0 pending ChangeNotification objects.

Highlighted
Rising star

Re: addRoutePattern getting axlcode response -1

Unfortunately, the insert Statement that is causing the Problem isn't in the AXL log

I'm guessing that if you do the same Operation via ccmadmin Webpage, it works, correct?

I do have a few concerns with regards to mandatory Parameters - if we look at the Schema (https://developer.cisco.com/site/axl/develop-and-test/documentation/latest-version/axl-soap.gsp)https://developer.cisco.com/site/axl/develop-and-test/documentation/latest-version/axl-soap.gsp

There's a few Parameters that are mandatory (non dotted lines) that, while not leaving out, you're sending empty. Amongst them: dialPlanName, digitDiscardInstructionName. The doc states dialPlanName is only mandatory for Patterns with a @ in it.. however, you're sending an empty tag, so I suspect it could try to search for an empty dialplan in a database table. The SQL error seems to suggest this: (informix.fk_numplan_fkdialplan - that seems to be some Kind of reference between a dialplan and a numplan table).

So here's what I would do: define the route pattern the way you Need it in ccmadmin. Then do a getRoutePattern in AXL and see what it is returning. In my experience, every empty tag it Returns (e.g. <dialPlan/> or <dialPlan></dialPlan> means that when you're adding/updating the object, you should leave it out (not an empty string, but a null value). If it is possible, I then try to reformulate your addRoutePattern (delete if from ccmadmin again of course), and this time only specifying tags that do have a value in your previous getRoutePattern, ignoring all tags that came back empty. I'd imagine that your request would then only look something like this:

<ns1:addRoutePattern>

   <routePattern>

    <pattern>0.1[2-9]XX[2-9]XXXXXX</pattern>

    <description>Long Distance PSTN</description>

    <routePartitionName uuid="{C0300070-1B84-E6E0-9C12-B3A7AD06B5A7}"/>

    <blockEnable>false</blockEnable>

    <useCallingPartyPhoneMask>On</useCallingPartyPhoneMask>

    <dialPlanName/>

    <digitDiscardInstructionName/>

    <networkLocation>OnNet</networkLocation>

    <prefixDigitsOut/>

    <routeFilterName/>

    <provideOutsideDialtone>false</provideOutsideDialtone>

    <destination>

     <routeListName uuid="{79717A73-2996-C571-98B1-E678FD4A9D9D}"/>

    </destination>

   </routePattern>

  </ns1:addRoutePattern>

<ns1:addRoutePattern>
   <routePattern>
    <pattern>0.1[2-9]XX[2-9]XXXXXX</pattern>
    <description>Long Distance PSTN</description>
    <routePartitionName uuid="{C0300070-1B84-E6E0-9C12-B3A7AD06B5A7}"/>
    <blockEnable>false</blockEnable>
    <useCallingPartyPhoneMask>On</useCallingPartyPhoneMask>
    <networkLocation>OnNet</networkLocation>
    <provideOutsideDialtone>false</provideOutsideDialtone>
    <destination>
     <routeListName uuid="{79717A73-2996-C571-98B1-E678FD4A9D9D}"/>
    </destination>
   </routePattern>
  </ns1:addRoutePattern>

(I can't guarantee that leaving out digitDiscardInstructionName works since the doc says it's mandatory.. but you'll find that out soon enough).

If that doesn't work, it may also be something about using uuids instead of names - you'll find some threads here that suggest that uuid and names are not always equal and sometimes using one or the other is required (even though as per the Interface spec, you should always be able to use both). So Long Story short, you could try specifying the Name of your Partition, rather than it's uuid, and the same for your route list.

I hope that helps. Please do post if you got a solution and what it was so that in Case this turns out to be another bug, the guys from developer Support can file and we can track it.

Beginner

Re: addRoutePattern getting axlcode response -1

Success

I removed the route filter and dial plan entries but most importantly used a name for the route partition instead of the uuid.

CreatePlease to create content