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

Update action on user's primary extension through AXL not working

We are trying to update user's primary extension by assigning a new primary extension with existing pattern/partition information in a .NET application via UpdateUserReq. It returns true (no errors/exceptions) but on CUCM primary extension remains blank. Any additional attributes that we need to set to achieve this? Thank you in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I recommend that approach (two steps).  There's also another way to bypass the restriction of the primary line having to be one of the user's associated devices before you set it as the primary extension.  Use addExtensionInfo, instead, and set the sortOrder to 0, which assigns it to the primary extension.

<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:updateUser>

        <userid>nicholas</userid>

        <addExtensionsInfo>

                <extension>

                       <sortOrder>0</sortOrder>

                       <pattern>3000</pattern>

                       <routePartition></routePartition>

                </extension>

       </addExtensionsInfo>

</ns:updateUser>

</soapenv:Body>

</soapenv:Envelope>

View solution in original post

15 REPLIES 15
Highlighted
Cisco Employee

Can you post a sample of the XML request(s) you're using?

Highlighted

I am not using XML. I have compiled WSDL and using function "UpdateUserReq" exposed by it.

Highlighted

So what are you using?  Java or .NET?  You're still sending XML, it's what the API does.  Could you either post the code that prepares the data for the update, or you can use something like Fiddler to capture the XML, and then post the XML.  I actually use Java itself to output the XML.  Here's a sample of the kind of code I use:

        //Create a String writer object which will be

        //used to write jaxbElment XML to string

        StringWriter writer = new StringWriter();

        // create JAXBContext which will be used to update writer

        JAXBContext context = JAXBContext.newInstance(XFkType.class);

        // marshall or convert jaxbElement containing student to xml format

        context.createMarshaller().marshal(jaxbObj, writer);

    

        //print XML string representation of Student object

        System.out.println( writer.toString() );

Highlighted

Sorry, I don't know why I missed the .NET in your original post. 

It would help if you could show the XML that you're sending.  Also, are you specifying the routePartitionName (yes, even if it is blank)?

Highlighted

yes, we are setting routePartitionName in the update. I will grab the XML using Fiddler and share with you.

Highlighted

here is XML that is going to the server:

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

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <soap:Body>

    <updateUser xmlns="http://www.cisco.com/AXL/API/10.5">

      <userid xmlns="">xyzyyzz</userid>

      <userLocale xmlns="" />

      <associatedDevices xmlns="">

        <device>CSFxyzxyz</device>

      </associatedDevices>

      <primaryExtension xmlns="">

        <pattern>20046</pattern>

        <routePartitionName>PT_XXXYYY</routePartitionName>

      </primaryExtension>

      <associatedPc xmlns="" />

      <associatedGroups xmlns="">

        <userGroup>

          <name>Standard CCM End Users</name>

          <userRoles>

            <userRole>Standard CCM End Users</userRole>

            <userRole>Standard CCMUSER Administration</userRole>

          </userRoles>

        </userGroup>

        <userGroup>

          <name>Standard CTI Enabled</name>

          <userRoles>

            <userRole>Standard CTI Enabled</userRole>

          </userRoles>

        </userGroup>

        <userGroup>

          <name>Standard CTI Allow Control of Phones supporting Connected Xfer and conf</name>

          <userRoles>

            <userRole>Standard CTI Allow Control of Phones supporting Connected Xfer and conf</userRole>

          </userRoles>

        </userGroup>

        <userGroup>

          <name>Standard CTI Allow Control of Phones supporting Rollover Mode</name>

          <userRoles>

            <userRole>Standard CTI Allow Control of Phones supporting Rollover Mode</userRole>

          </userRoles>

        </userGroup>

      </associatedGroups>

      <digestCredentials xmlns="" />

      <phoneProfiles xmlns="">

        <profileName uuid="bd7190d8-73e2-7f53-be33-52170979ffb6">CSTTestDeviceProfile</profileName>

      </phoneProfiles>

      <presenceGroupName xmlns="">Standard Presence group</presenceGroupName>

      <subscribeCallingSearchSpaceName xmlns="">CSS_XYZXYZ</subscribeCallingSearchSpaceName>

      <enableMobility xmlns="">true</enableMobility>

      <enableMobileVoiceAccess xmlns="">true</enableMobileVoiceAccess>

      <primaryDevice xmlns="" />

      <enableEmcc xmlns="">false</enableEmcc>

      <ctiControlledDeviceProfiles xmlns="" />

      <patternPrecedence xmlns="" />

      <numericUserId xmlns="" />

      <mlppPassword xmlns="" />

      <homeCluster xmlns="">true</homeCluster>

      <imAndPresenceEnable xmlns="">true</imAndPresenceEnable>

      <serviceProfile xmlns="" uuid="{A46437D0-2222-B226-F5AA-70F471CC733E}">UCSP_JABBER_XYZ</serviceProfile>

      <directoryUri xmlns="" xsi:nil="true" />

      <selfService xmlns="">20046</selfService>

      <userProfile xmlns="" />

      <ldapDirectoryName xmlns="" />

      <userIdentity xmlns="">xyzyyzz@myorg.com</userIdentity>

      <nameDialing xmlns="" />

      <ipccExtension xmlns="" />

      <convertUserAccount xmlns="" />

      <accountType xmlns="" xsi:nil="true" />

      <authenticationType xmlns="" xsi:nil="true" />

    </updateUser>

  </soap:Body>

</soap:Envelope>

Highlighted
Beginner

Which AXL version and which CUCM version do you use?

Highlighted

10.5 AXL on 10.5 CUCM.

Highlighted

Just a thought (I can't test this at the moment), but I know that the Primary Line is validated to ensure it is present on one of the user's associated devices.  If you are trying to update the user to add the device at the same time as setting the primary line, there might be a race condition where AXL attempts to do one before the other.

Maybe try making this a two-request process where you associate the device, and then do a subsequent updateUser to set the Primary Line..?

Highlighted

I recommend that approach (two steps).  There's also another way to bypass the restriction of the primary line having to be one of the user's associated devices before you set it as the primary extension.  Use addExtensionInfo, instead, and set the sortOrder to 0, which assigns it to the primary extension.

<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:updateUser>

        <userid>nicholas</userid>

        <addExtensionsInfo>

                <extension>

                       <sortOrder>0</sortOrder>

                       <pattern>3000</pattern>

                       <routePartition></routePartition>

                </extension>

       </addExtensionsInfo>

</ns:updateUser>

</soapenv:Body>

</soapenv:Envelope>

View solution in original post

Highlighted

User and device (with the line) are already associated. In this request, we are just trying to update primary extension. It returns true but changes nothing on the user.

Highlighted

In that case, you may want to not re-include the device association part of the request, as I suspect that will have the effect of AXL first removing all associated devices, and then re-adding the (same) device - possibly causing the race condition previously mentioned.

Highlighted

We tried the approach of not including device association again and just update primary extension - same result.

In .Net, we did not find any API for updating "extension info". We are now trying to do it using raw XML instead. I will post the results once we complete this change and test it.

Highlighted

It worked with raw XML. Thank you.