cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3926
Views
0
Helpful
14
Replies

AXL API to add Jabber throwing error 5007

arjun00011
Beginner
Beginner

Hi all,

I am not sure whether this is the right forum to post this question. Please mention the correct link for the forum if this is not the right forum.

When we are trying to add Jabber/Cisco hard phone into the CUCM through AXL application we are able to add line but getting an error code Error Code-5007 in the response while configuring the device page(phone) through AXL where we are sending the correct request with valid parameters.

Note-We are using AXL API version 8.5 for all our automation stuffs on CUCM.

It was working fine before CUCM patch upgradation.

Complete CUCM version -System version: 8.6.2.24096-2

Was there a recent upgrade of the CUCM – Yes, CUCM was 8.6.2.21900-5 and we upgraded to 8.6.2.24096-2

What is the exact error message you are seeing when trying to add the phone?

When trying to add phone by using AXL API we are getting the below error

Error Code-5007

  • Exception :  error code 5001 <axl:message>schema_reference.4: Failed to read schema document '/usr/local/thirdparty/jakarta-tomcat/webapps/axl/schema/6.1/SoapEnvelope.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.</axl:message>

We are trying to automate the phone addition process.

14 Replies 14

npetrele
Cisco Employee
Cisco Employee

Could you post a sample of the XML you are using?  Just change any private information in the AXL request to something generic.

Also, which error are you getting - 5001 or 5007?  You say 5007, but the text you quoted is 5001.

EDIT: Also, it looks like you're using a 6.1 AXL schema.  You might want to re-download the axlsqltoolkit.zip from CUCM and use the 8.0 schemas to make sure you've got the right headers and namespace. 

Hi,

Request sample:

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

<soapenv:Header/>

<soapenv:Body>

<ns:addPhone sequence="?">

<phone ctiid="?">

<name>JohnSF</name>

<description>John Jabber</description>

<product>Cisco Unified Client Services Framework</product>

<class>Phone</class>

<protocol>SIP</protocol>

<protocolSide>User</protocolSide>

<callingSearchSpaceName uuid="?">BLR-DEV-CSS</callingSearchSpaceName>

<devicePoolName>BLR-jphone01</devicePoolName>

<mediaResourceListName>BLR-MGRL</mediaResourceListName>

<locationName>BLR</locationName>

<addDeviceMobility>

<deviceMobility>Default</deviceMobility>

</addDeviceMobility>

<lines>

<line>

<index>1</index>

<label>John</label>

<asciiLabel>John</asciiLabel>

<display>John</display>

<displayASCII>John</displayASCII>

<dirn uuid="responsecode"></dirn>

<ringSetting>Ring</ringSetting>

<consecutiveRingSetting>Use System Default</consecutiveRingSetting>

<mwlPolicy>Use System Policy</mwlPolicy>

</line>

</lines>

<phoneTemplateName uuid="?">Standard Client Services Framework</phoneTemplateName>

<securityProfileName>Cisco Unified Client Services Framework - Standard SIP Non-Secure</securityProfileName>

<sipProfileName>Standard SIP Profile</sipProfileName>

</phone>

</ns:addPhone>

</soapenv:Body>

</soapenv:Envelope>

Sorry for mentioning the wrong error code. I am receiving "5001".

I'll take a closer look at it, but I can see immediately that your XML uses the wrong case in at least one spot.  <displayASCII> should be <displayAscii>. 

Hi Nicholas,

Were you able to find any other mistakes from the above post? Please let us know.

No, other than that, it looks okay to me.  If all your parameters are correct, then it should work.  Let me know if it doesn't.

We tried changing the tag as pointed out by you. But I am still receiving the same error message posted earlier.

By the way, what is this "SoapEnveloper.xsd"?

Note that addition to having a valid version in the AXL namespace declaration in the XML request itself, it is necessary to have a valid version 'SOAPAction' HTTP header on the request.

POST https://10.53.205.46:8443/axl/ HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: text/xml;charset=UTF-8

SOAPAction: "CUCM:DB ver=10.5 getUser"

Authorization: Basic QWRtaW5pc3RyYXRvcjpjaXNjb3BzZHQ=

Content-Length: 288

Host: 10.53.205.46:8443

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<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:getUser sequence="1234">

         <userid>dstaudt</userid>

      </ns:getUser>

   </soapenv:Body>

</soapenv:Envelope>

This is NOT an exact copy of your request, but this request is tested and works.  Perhaps you can use it as a model for your own.

IMPORTANT:  The directory number for your line must already exist, or you'll have to create it as a separate step (addLine). 

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

  <soapenv:Header/>

  <soapenv:Body>

    <ns:addPhone sequence="?">

      <phone ctiid="?">

        <name>CSFJohn</name>

        <description>John Jabber</description>

        <product>Cisco Unified Client Services Framework</product>

        <class>Phone</class>

        <protocol>SIP</protocol>

        <protocolSide>User</protocolSide>

        <callingSearchSpaceName>CSS1</callingSearchSpaceName>

        <devicePoolName>Default</devicePoolName>

        <mediaResourceListName/>

        <networkLocation>Use System Default</networkLocation>

        <locationName>Hub_None</locationName>

        <deviceMobilityMode>Default</deviceMobilityMode>

        <lines>

          <line>

            <index>1</index>

            <label>John</label>

            <asciiLabel>John</asciiLabel>

            <display>John</display>

            <displayAscii>John</displayAscii>

            <dirn>

               <pattern>9010</pattern>

               <routePartitionName/>

            </dirn>

            <ringSetting>Ring</ringSetting>

            <consecutiveRingSetting>Use System Default</consecutiveRingSetting>

            <mwlPolicy>Use System Policy</mwlPolicy>

          </line>

        </lines>

        <phoneTemplateName>Standard Client Services Framework</phoneTemplateName>

        <securityProfileName>Cisco Unified Client Services Framework - Standard SIP Non-Secure</securityProfileName>

        <sipProfileName>Standard SIP Profile</sipProfileName>

      </phone>

    </ns:addPhone>

  </soapenv:Body>

</soapenv:Envelope>

what is "9010" in your above example?

If it is extension, then I tried with your above code by adding extension and I am still receiving the same error.

It is the directory number.

Can you post the exact addLine XML you used to add the 9010 directory number?  Then can you post the exact XML you used to perform addPhone? 

addLine


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

<soapenv:Header/>

<soapenv:Body>

<ns:addLine sequence="?">

<line>

<pattern>12345678</pattern>

<description>Arun</description>

<usage>Device</usage>

<alertingName>Arun</alertingName>

<asciiAlertingName>Arun</asciiAlertingName>

<routePartitionName uuid="?">BGA-L1-PT</routePartitionName>

<callForwardAll>

<forwardToVoiceMail>false</forwardToVoiceMail>

<callingSearchSpaceName uuid="?"></callingSearchSpaceName>

<destination></destination>

</callForwardAll>

<callForwardBusy>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardBusy>

<callForwardBusyInt>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardBusyInt>

<callForwardNoAnswer>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardNoAnswer>

<callForwardNoAnswerInt>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardNoAnswerInt>

<callForwardNotRegistered>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardNotRegistered>

<callForwardNotRegisteredInt>

<forwardToVoiceMail>true</forwardToVoiceMail>

<callingSearchSpaceName uuid="?">BGA-CF-CSS</callingSearchSpaceName>

<destination></destination>

</callForwardNotRegisteredInt>

<callPickupGroupName uuid="?"></callPickupGroupName>

<voiceMailProfileName>BGA_Exchange_UM</voiceMailProfileName>

</line>

</ns:addLine>

</soapenv:Body>

</soapenv:Envelope>

addPhone


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

  <soapenv:Header/>

  <soapenv:Body>

    <ns:addPhone sequence="?">

      <phone ctiid="?">

        <name>CSFarun</name>

        <description>Arun Jabber</description>

        <product>Cisco Unified Client Services Framework</product>

        <class>Phone</class>

        <protocol>SIP</protocol>

        <protocolSide>User</protocolSide>

        <callingSearchSpaceName>BGA-INTLDEV-CSS</callingSearchSpaceName>

        <devicePoolName>BGA-jphone01</devicePoolName>

        <mediaResourceListName>BGA-MRGL</mediaResourceListName>

        <networkLocation>Use System Default</networkLocation>

        <locationName>BGA</locationName>

        <deviceMobilityMode>Default</deviceMobilityMode>

        <lines>

          <line>

            <index>1</index>

            <label>Arun</label>

            <asciiLabel>Arun</asciiLabel>

            <display>Arun</display>

            <displayAscii>Arun</displayAscii>

            <dirn>

               <pattern>12345678</pattern>

               <routePartitionName/>

            </dirn>

            <ringSetting>Ring</ringSetting>

            <consecutiveRingSetting>Use System Default</consecutiveRingSetting>

            <mwlPolicy>Use System Policy</mwlPolicy>

          </line>

        </lines>

        <phoneTemplateName>Standard Client Services Framework</phoneTemplateName>

        <securityProfileName>Cisco Unified Client Services Framework - Standard SIP Non-Secure</securityProfileName>

        <sipProfileName>Standard SIP Profile</sipProfileName>

      </phone>

    </ns:addPhone>

  </soapenv:Body>

</soapenv:Envelope>

I'm guessing you need to change this...

            <dirn>                

              <pattern>12345678</pattern>                

              <routePartitionName/>             

            </dirn>             

...to this...

            <dirn>                

              <pattern>12345678</pattern>                

              <routePartitionName>BGA-L1-PT</routePartitionName>

            </dirn>

The former is saying that the pattern's routePartitionName is None, but you defined a route partition name when you added the line.  Give that a shot and let us know if it works. 

I am still receiving the same error after making changes as per your suggestion.

Your XML works fine for me, although I must change some of the data since I don't have the same partitions, CSS, security profile, etc.

Error 5007 simply means it failed.  You need to look at the <faultstring> and <axlmessage> values that are returned to see why it failed. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers