04-14-2016 10:53 AM
The documentation for CUCM 9.0 up to 11.0 (https://developer.cisco.com/site/axl/documents/latest-version/axl-soap.gsp) states that the listServiceProfile command has three possible return tags: name, description and isDefault.
However, this is incorrect.
For instance, on 10.5.2(SU3), when I send this request:
<searchCriteria><name>%</name></searchCriteria><returnedTags><name/><isDefault/></returnedTags>
I get an error response
"Unmarshalling Error: unexpected element (uri:\"\", local:\"isDefault\"). Expected elements are <{}id>,<{}withinImmersiveKbits>,<{}withinVideoBandwidth>,<{}name>,<{}withinAudioBandwidth> "
The same happens if I send a description return tag. So it appears the doc is not in sync with the actual API.
04-15-2016 08:35 AM
The following seems to work on my 10.5(1) system:
POST https://ds-ucm105.cisco.com:8443/axl/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "CUCM:DB ver=10.5 listServiceProfile"
Content-Length: 434
Host: ds-ucm105.cisco.com:8443
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic QWRtaW5pc3RyYXRvcjpjaXNjb3BzZHQ=
<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:listServiceProfile>
<searchCriteria>
<name>%</name>
</searchCriteria>
<returnedTags>
<name/>
<isDefault/>
</returnedTags>
</ns:listServiceProfile>
</soapenv:Body>
</soapenv:Envelope>
---------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Body>
<ns:listServiceProfileResponse>
<return>
<serviceProfile uuid="{924CC840-579A-2006-0D74-D70F85C78F80}">
<name>Test UC Service Profile</name>
<isDefault>true</isDefault>
</serviceProfile>
<serviceProfile uuid="{38B265DF-7D0F-72FD-0F91-5961D493634C}">
<name>Test UC Service Profile2</name>
<isDefault>false</isDefault>
</serviceProfile>
</return>
</ns:listServiceProfileResponse>
</soapenv:Body>
</soapenv:Envelope>
<!--This API has been processed by GAXL not AXL-->
What layer is giving the unmarshaling error? Can you confirm the actual XML request/response?
04-15-2016 04:24 PM
Hmm.. so I fired up fiddler to post request/response and funny enough, today my CUCM seems to be in a better mood. it seems the CUCM was looking at another object (location sounds promising given the fields that were returned)
No idea how that could be..
You wouldn't happen to have the syntax for the searchCriteria handy by any chance.. I know it must be something sql like.. but I'd like to know how far I can go with it.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide