cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1228
Views
5
Helpful
5
Replies

Remove and Update FAC Using AXL

fdharmawan
Level 4
Level 4

Hi Guys,

I want to add, update, and remove FAC using AXL. I already got the syntax to add new FAC. The syntax is pretty much like this:

 

<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:addFacInfo sequence="?">
<facInfo>
<name>TEST</name>
<code>098765</code>
<authorizationLevel>40</authorizationLevel>
</facInfo>
</ns:addFacInfo>
</soapenv:Body>
</soapenv:Envelope>

 

But apparently it is not that simple to update or remove the FAC just by changing the addFacInfo to updateFacInfo and removeFacInfo respectively. Do you guys have an example script to update and remove FAC? Thank you.

1 Accepted Solution

Accepted Solutions

You can use pretty much any language that can send XML over HTTP...

 

Here is the add and update XML from a test run of the sample:

 

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Body>
    <ns0:addFacInfo xmlns:ns0="http://www.cisco.com/AXL/API/11.5">
      <facInfo>
        <name>testFAC</name>
        <code>1234</code>
        <authorizationLevel>0</authorizationLevel>
      </facInfo>
    </ns0:addFacInfo>
  </soap-env:Body>
</soap-env:Envelope>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Body>
    <ns0:updateFacInfo xmlns:ns0="http://www.cisco.com/AXL/API/11.5">
      <name>testFAC</name>
      <newName>newTestFAC</newName>
      <code>5678</code>
      <authorizationLevel>1</authorizationLevel>
    </ns0:updateFacInfo>
  </soap-env:Body>
</soap-env:Envelope>

View solution in original post

5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

I was able to get this working in my 11.5 lab.  Calling .updateFacInfo() looks a little different due to the xsdChoice for name vs. uuid, as you have to use the 'name' keyword, and then use keywords for the other elements at the same level in the XML document:

 

resp = service.updateFacInfo( name = 'testFAC',
    newName = 'newTestFAC',
    code = '5678',
    authorizationLevel = '0' )

I added the sample to the collection here, in case you are using Python, check it out: https://github.com/CiscoDevNet/axl-python-zeep-sample

Hi dstaudt,

Is it needed to be done on Python? Because I have no experience on it and currently debugging it using Postman.

And from your example, you wanted to change the name, right? What if I want to change the code or authorization level? Does the same approach will do the work?

Thank you.

You can use pretty much any language that can send XML over HTTP...

 

Here is the add and update XML from a test run of the sample:

 

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Body>
    <ns0:addFacInfo xmlns:ns0="http://www.cisco.com/AXL/API/11.5">
      <facInfo>
        <name>testFAC</name>
        <code>1234</code>
        <authorizationLevel>0</authorizationLevel>
      </facInfo>
    </ns0:addFacInfo>
  </soap-env:Body>
</soap-env:Envelope>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Body>
    <ns0:updateFacInfo xmlns:ns0="http://www.cisco.com/AXL/API/11.5">
      <name>testFAC</name>
      <newName>newTestFAC</newName>
      <code>5678</code>
      <authorizationLevel>1</authorizationLevel>
    </ns0:updateFacInfo>
  </soap-env:Body>
</soap-env:Envelope>

Hi dstaudt,

That works perfect! There was only difference I noticed between my code and your code. I defined xmlns:ns="http://www.cisco.com/AXL/API/10.5", while you defined xmlns:ns0="http://www.cisco.com/AXL/API/11.5". Does that make make any difference from code perspective? I'm just curious how a little adjustment could make the code works.

The XML namespace version should match with your CUCM (though FYI CUCM supports several previous AXL versions as well as the current one...)