I get the following error when trying to Device to appuser associateddevice.
The following error is:
<faultstring>Element or attribute do not match QName production: QName::=(NCName':')?NCName. </faultstring>
<axl:message>Element or attribute do not match QName production: QName::=(NCName':')?NCName. </axl:message>
My snip of my code is:
|string version = "7.1";|
|string soap = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.cisco.com/AXL/API/'"+ version +"' \">\n";|
|soap += "<soapenv:Header/>\n";|
|soap += "<soapenv:Body>\n";|
|soap += "<ns:updateAppUser sequence=\"?\">\n";|
|soap += "<userid>abxyz/userid>\n";|
|soap += "<associatedDevices> \n";|
|soap += "<device>SEP8C705A057CB9</device>\n";|
|soap += "</associatedDevices>\n";|
|soap += "<ns:/updateAppUserResponse>\n";|
|soap += "</soapenv:Body>\n";|
|soap += "</soapenv:Envelope>\n";|
can some one help me.
Yes, I also noticed you have a mismatched tag. This:
Here's a working example of the XML request. I strongly recommend testing out your requests with the free utility SoapUI. You can find and fix problems with your XML that way, and then turn it into code later.
Thanks it works fine now, I had made type mismatches.
I have a question.
When the is a device already associated to the Application user and want to add one more how can you do it?
If I do it now it removed the device that already there.
In the case of associated devices, you would need to perform a <getUser> request first to retrieve the current list of associated devices, make you modifications and then use <updateUser> to submit the replacement list.
Note, it is also possibly to do this more a bit more efficiently (though with other caveats like backward compatibility and complexity) by using direct SQL commands via <executeSqlQuery>/<executeSqlUpdate> - see the Data Dictionary for CUCM table/field details. You would mainly be interested in the 'enduser', 'device' and 'enduserdevicemap' tables.