cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

If your Cloud Collaboration question is not answered quickly, please email devsupport@webex.com for additional help

309
Views
15
Helpful
6
Replies
Highlighted

A simple question with UpdateUserReq AXL 11.5

 

public AXLAPI11::UpdateUserReq UpdateUserReq11(string userId,string[] associatedDevices)
        {
            AXLAPI11::UpdateUserReq updateUserReq = new AXLAPI11::UpdateUserReq()
            {
                ItemElementName = AXLAPI11::ItemChoiceType6.userid,
                Item = userId,
                associatedDevices = associatedDevices,
            };
            return updateUserReq;
        }

 

I'm using this simple script to associate a device to a phone, but when do the call to cucm to update the user
i receive an error.
ERROR [http-bio-443-exec-9] axlapiservice.AXLAPIServiceSkeleton - com.cisco.www.axlapiservice.AXLAPIServiceSkeleton@9f68e1
java.lang.NullPointerException

The updaterequest need all fields filled with old/new values or i can update a single parameter?

Thx you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

This seems to be an issue previously identified in https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvu98594

The workaround is what you found below, i.e. either ommit the problematic xsi:nil tags, or provide them as empty.

View solution in original post

6 REPLIES 6
Highlighted
Cisco Employee

All the elements (besides the ID) should be optional - just provide what should be updated.
Can you get output of the actual HTTP request/XML object that gets sent to AXL?  If you have a small working sample of the code that might be helpful...
I usually test requests out first using SoapUI before implementing in code - if you can get it working there, it may help understanding what your WSDL autogen code is doing.

Highlighted

Thx you dstaudt,
i did a sniffing to retrieve the soap request originated by code sended to CUCM and this is the result:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <updateUser xmlns="http://www.cisco.com/AXL/API/11.5">
            <userid xmlns="">3129</userid>
            <userLocale xsi:nil="true" xmlns="" />
            <associatedDevices xmlns="">
                <device>SEP000000003129</device>
            </associatedDevices>
            <associatedGroups xmlns="">
                <userGroup>
                    <name>Standard CCM End Users</name>
                    <userRoles>
                        <userRole>Standard CCM End Users</userRole>
                        <userRole>Standard CCMUSER Administration</userRole>
                    </userRoles>
                </userGroup>
            </associatedGroups>
            <digestCredentials xsi:nil="true" xmlns="" />
            <subscribeCallingSearchSpaceName xsi:nil="true" xmlns="" />
            <mlppPassword xsi:nil="true" xmlns="" />
            <serviceProfile xsi:nil="true" xmlns="" />
            <directoryUri xsi:nil="true" xmlns="" />
            <selfService xsi:nil="true" xmlns="" />
            <userProfile xsi:nil="true" xmlns="" />
            <ldapDirectoryName xsi:nil="true" xmlns="" />
            <ipccExtension xsi:nil="true" xmlns="" />
            <convertUserAccount xsi:nil="true" xmlns="" />
        </updateUser>
    </soap:Body>
</soap:Envelope>

Below the server response:

<?xml version='1.0' encoding='utf-8'?>
<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>updateUser</request>
                </axlError>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

And the c# Code is very simple:

AXLAPI11::UpdateUserReq updateUserReq11 = new UpdateUserRequest().UpdateUserReq11(user.userid);
string[] assUserArr = new string[getUserRes9.@return.user.associatedDevices.Length];
int counter = 0;
foreach (string userass in getUserRes9.@return.user.associatedDevices)
{
  assUserArr[counter] = userass;
  counter++;
}
foreach (AXLAPI9::RUserUserGroup Ru in getUserRes9.@return.user.associatedGroups)
{
  AXLAPI11::UpdateUserReqUserGroup Xu = new AXLAPI11::UpdateUserReqUserGroup() { name = Ru.name, userRoles = Ru.userRoles };
  XuArr[counter] = Xu;
  counter++;
}
updateUserReq11.associatedGroups = XuArr;
updateUserReq11.associatedDevices = assUserArr;
AXLAPI11::StandardResponse standardResponse = AXL11_5.updateUser(updateUserReq11);

 

Highlighted

UPDATE 1

If i set value to empty and not null as the xml below the soap request gone fine..BUT ! ...because there is always a BUT!
It didn't do anything... the device is not associated with the end user

REQUEST

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <updateUser xmlns="http://www.cisco.com/AXL/API/11.5">
            <userid xmlns="">3130</userid>
            <userLocale xsi:nil="true" xmlns="" />
            <associatedDevices xmlns="">
                <device>SEP000000003130</device>
            </associatedDevices>
            <associatedGroups xmlns="">
                <userGroup>
                    <name>Standard CCM End Users</name>
                    <userRoles>
                        <userRole>Standard CCM End Users</userRole>
                        <userRole>Standard CCMUSER Administration</userRole>
                    </userRoles>
                </userGroup>
            </associatedGroups>
            <digestCredentials xmlns="" />
            <subscribeCallingSearchSpaceName uuid="" xmlns="" />
            <mlppPassword xmlns="" />
            <serviceProfile uuid="" xmlns="" />
            <directoryUri xmlns="" />
            <selfService xmlns="" />
            <userProfile uuid="" xmlns="" />
            <ldapDirectoryName uuid="" xmlns="" />
            <ipccExtension uuid="" xmlns="" />
            <convertUserAccount uuid="" xmlns="" />
        </updateUser>
    </soap:Body>
</soap:Envelope>
REPLY

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:updateUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.5">
         <return>{1C3434DA-548C-7D0E-55E3-7B41FE6A8C9D}</return>
      </ns:updateUserResponse>
   </soapenv:Body>
</soapenv:Envelope>

And the AXL Log from CUCM
2020-10-30 17:13:07,531 INFO [http-bio-443-exec-13] filters.TimingFilter - Request 1603992155205 received from ******* at ip ******* was processed in 100ms

Stay Tuned

Highlighted

Hmm...in testing around with this, at first it seemed I was able to reproduce your issue here, but after awhile it seemed to start working...not sure if I was originally doing something unexpected/wrong, if something in AXL/CUCM unexpectedly changed, or..?

This is the request that is now working (<associatedDevices> was originally empty for this user):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <updateUser xmlns="http://www.cisco.com/AXL/API/11.5">
            <userid xmlns="">dstaudt2</userid>
            <userLocale xsi:nil="true" xmlns="" />
            <associatedDevices xmlns="">
               <device>BOTDSTAUDT2</device>
               <device>CTIPDSTAUDT</device>
               <device>CSFdstaudt2</device>
            </associatedDevices>
            <associatedGroups xmlns="">
                <userGroup>
                    <name>Standard CCM End Users</name>
                    <userRoles>
                        <userRole>Standard CCM End Users</userRole>
                        <userRole>Standard CCMUSER Administration</userRole>
                    </userRoles>
                </userGroup>
            </associatedGroups>
            <digestCredentials xmlns="" />
            <subscribeCallingSearchSpaceName uuid="" xmlns="" />
            <mlppPassword xmlns="" />
            <serviceProfile uuid="" xmlns="" />
            <directoryUri xmlns="" />
            <selfService xmlns="" />
            <userProfile uuid="" xmlns="" />
            <ldapDirectoryName uuid="" xmlns="" />
            <ipccExtension uuid="" xmlns="" />
            <convertUserAccount uuid="" xmlns="" />
        </updateUser>
    </soap:Body>
</soap:Envelope>

If you are still having problems and haven't already, you might try increasing the AXL log level - might give a hint.

Screen Shot 2020-10-30 at 2.59.11 PM.png

If weirdness is still happening, I would suggest opening a DevNet dev support ticket so we can dig into the details/logs: https://developer.cisco.com/site/support/

Highlighted

This seems to be an issue previously identified in https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvu98594

The workaround is what you found below, i.e. either ommit the problematic xsi:nil tags, or provide them as empty.

View solution in original post

Highlighted

You're right .. I was tired from a tough day of work... when i read your reply i suppose to have did something wrong... and yes! do you know what i did? I was looking for user change in the old CUCM... WTF... and the code below did his work..
Ps sorry for my english And Thx you for you help!

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <updateUser xmlns="http://www.cisco.com/AXL/API/11.5">
            <userid xmlns="">3130</userid>
            <userLocale xsi:nil="true" xmlns="" />
            <associatedDevices xmlns="">
                <device>SEP000000003130</device>
            </associatedDevices>
            <associatedGroups xmlns="">
                <userGroup>
                    <name>Standard CCM End Users</name>
                    <userRoles>
                        <userRole>Standard CCM End Users</userRole>
                        <userRole>Standard CCMUSER Administration</userRole>
                    </userRoles>
                </userGroup>
            </associatedGroups>
            <digestCredentials xmlns="" />
            <subscribeCallingSearchSpaceName uuid="" xmlns="" />
            <mlppPassword xmlns="" />
            <serviceProfile uuid="" xmlns="" />
            <directoryUri xmlns="" />
            <selfService xmlns="" />
            <userProfile uuid="" xmlns="" />
            <ldapDirectoryName uuid="" xmlns="" />
            <ipccExtension uuid="" xmlns="" />
            <convertUserAccount uuid="" xmlns="" />
        </updateUser>
    </soap:Body>
</soap:Envelope>



This widget could not be displayed.