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

UpdateAppUser device to associateddevice

Hi all,

I get the following error when trying to Device to appuser associateddevice.

The following error is:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

  <SOAP-ENV:Header />

  <SOAP-ENV:Body>

    <SOAP-ENV:Fault>

      <faultcode>SOAP-ENV:Client</faultcode>

      <faultstring>Element or attribute do not match QName production: QName::=(NCName':')?NCName. </faultstring>

      <detail>

        <axl:Error xmlns:axl="http://www.cisco.com/AXL/API/7.1">

          <axl:code>5001</axl:code>

          <axl:message>Element or attribute do not match QName production: QName::=(NCName':')?NCName. </axl:message>

          <request>updateAppUser</request>

        </axl:Error>

      </detail>

    </SOAP-ENV:Fault>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

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.

Thanks

Jan Meeling

5 REPLIES 5
Highlighted
Cisco Employee

You're missing a < here:

<userid>abxyz/userid>


Should be...


<userid>abxyz</userid>

Highlighted

Hi Nicholas,

Thanks for your quick response.

I saw it even with the < I get the same error.

Regards

Jan

Highlighted

Yes, I also noticed you have a mismatched tag.  This:


<ns:/updateAppUserResponse>


..should be..


<ns:/updateAppUser>

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.

<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:updateAppUser sequence="?">

         <userid>daggett</userid>

         <associatedDevices>

            <device>SEP54EE7510D1D0</device>

         </associatedDevices>

      </ns:updateAppUser>

   </soapenv:Body>

</soapenv:Envelope>

SoapUI | Functional Testing for SOAP and REST APIs

Highlighted

Hi Nicholas,

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.

Regards,

Jan Meeling

Highlighted

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.

This widget could not be displayed.