05-01-2014 05:01 AM
Hello,
I'm working as a consultant on a project where we use the UDS API.
I'm working with C# .NET and visual studio.
I have downloaded the xml schemas found here:
The problem is that the response we get from the server does not seem to match the schema.
Here is an example xml response when calling user get...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user version="9.1.1" uri="https://xxx:8443/cucm-uds/user/xxx">
<userName>xxx</userName>
<firstName>xxx</firstName>
<lastName>xxx</lastName>
<middleName/>
<nickName/>
<phoneNumber>xxx</phoneNumber>
<homeNumber>xxx</homeNumber>
<mobileNumber>xxx</mobileNumber>
<mobileConnect>true</mobileConnect>
<userLocale>xxx</userLocale>
<email>xxx</email>
<msUri>xxx</msUri>
<department>xxx</department>
<manager>xxx</manager>
<title>xxx</title>
<pager>xxx</pager>
<useLdapAuth>true</useLdapAuth>
<directoryUri exist="true">xxx</directoryUri>
<callerFilters uri="https://xxx:8443/cucm-uds/user/xxx/callerFilters"/>
<contactAssociations uri="https://10.159.1.40:8443/cucm-uds/user/xxx/contactAssociations"/>
<contacts uri="https://xxx:8443/cucm-uds/user/xxx/contacts"/>
<credentials uri="https://xxx:8443/cucm-uds/user/xxx/credentials"/>
<devices uri="https://xxx:8443/cucm-uds/user/xxx/devices"/>
<notifications uri="https://xxx:8443/cucm-uds/user/xxx/notifications"/>
<numbers uri="https://xxx:8443/cucm-uds/user/xxx/numbers"/>
<phoneLanguage uri="https://xxx:8443/cucm-uds/user/xxx/phoneLanguage"/>
<profiles uri="https://xxx:8443/cucm-uds/user/xxx/profiles"/>
<remoteDestinations uri="https://xxx:8443/cucm-uds/user/xxx/remoteDestinations"/>
</user>
It does not seem to match: "user.get.xsd"
Is it a version conflict ? is there a way to get the corresponding schema version to the current installation on the server ?
Best Regards.
Torben Rohde
05-07-2014 06:07 AM
Hi Torben,
Can you please try to Enable and Gather UDS Logs as per mentioned in the Cisco User Data Services (UDS) Developer Guide. They provide details on exactly what services were invoked, when they were invoked, and what they actually did including any run time errors. In mean time try the Hello world example as explained in the document .
Thanks and Regards,
Geevarghese
05-12-2014 12:16 AM
Hello,
I don't have direct access to the server, only the API. I can try and contact our customer about enabling logging.
We don't have any trouble getting a response from the API. I also tried calling with SOAP UI, and everything seems to work fine.
Our problem is when calling a REST service with .NET. I'm using the XSD files from your website to generate classes in .NET. The problem occurs when we call a service and deserialize the response. There seems to be a difference with the XML received and the schema files.
I have tried running the XML trough a schema validation and it does not seem to match.
In the response there is a version "9.1.1"... can that have anything to do with it ?
07-16-2014 06:48 PM
UDS is not officially supported in versions of CUCM prior to 10.0.1.
The XML schema for UDS changed drastically for some resources in version 10.0.1 and as such it is not possible to offer backwards-compatibility with 9.1.1. This is why the XML schema differs.
However, going forward, the XML schema should only change in backwards-compatible ways.
05-25-2016 02:31 PM
Hello all,
Could you please tell me where to download the UDS xml schemas?
Thank you very much,
Phuong
05-25-2016 02:36 PM
05-25-2016 02:42 PM
Thank you very much for your very quick response, Christopher!
-Phuong
05-25-2016 11:26 PM
Hello all,
I would like to map all UDS xml schemas to java classes using JAXB. The first time on common.get.xsd, it successed and produced five java files. However, the second time on globalBindings.xsd, it's failed.
C:\test>xjc common.get.xsd -p first.test.cisco.uds -d src/generated
parsing a schema...
compiling a schema...
com\pann\cisco\uds\JAXBGetCommon_DrillDown.java
com\pann\cisco\uds\JAXBGetCommon_Error.java
com\pann\cisco\uds\JAXBGetCommon_Option.java
com\pann\cisco\uds\ObjectFactory.java
com\pann\cisco\uds\package-info.java
C:\test>xjc globalBindings.xsd -p com.pann.cisco.uds -d src/generated
parsing a schema...
[ERROR] vendor extension bindings (jaxb:extensionBindingPrefixes) are not allowed in the strict mode. Use -extension.
line 9 of file:/C:/test/globalBindings.xsd
Failed to parse a schema.
Do I need to have other options? What could be the best tool to do this task?
Thank you very much for your help.
-Phuong
05-26-2016 07:38 AM
You should run xjc on the whole xsd directory, not one file at a time.
For example:
xjc -extension -p com.pann.cisco.uds -d src/generated [directory with xsd files]
EDIT: Also, "-extension" is required because the XSD schema files use binding prefixes.
05-26-2016 08:32 AM
Thank you very much Christopher! I got it.
Thanks again,
Phuong
06-01-2016 10:34 AM
Hi Christopher,
Since my company lab has multiple versions of Cisco server (9.x.x, 10.x.x, and 11.x.x), do you know where to download the UDS xml schemas for old versions?
Thank you,
Phuong
06-01-2016 11:25 AM
Currently the schemas hosted on the DevNet UDS site cover v11.0. Distinct sets of schema files from previous versions are not offered, though you can check the 'New and Changed' details here to understand the few changes that have occurred: https://developer.cisco.com/site/user-data-services/develop-and-test/developer-guide/#new-and-changed
Note that UDS was first released in CUCM 10.0, and so is not present in 9.x versions. However, it is generally possible to access/update the same user info in the CUCM database via the AXL SOAP API, with the caveat that AXL requires admin-level credentials, vs. user-level credentials for UDS: https://developer.cisco.com/site/axl/
06-01-2016 11:32 AM
dstaudt - UDS was available from 9.0(1) onward.
NPM
06-01-2016 11:35 AM
Looks like the Developer Guide needs a small update then, thanks
06-01-2016 03:47 PM
UDS first appeared on CUCM in 8.6.2, but it is not officially supported until 10.0(1). A big part of that is due to incompatible interface specification changes made as part of the 10.0(1) release.
In practice, you should be able to use JAXB classes compiled from the 11.x XSD schema files to unmarshal data from any version of UDS from 10.0(1) and up. Marhshaling data out to any version should also work, as long as you are careful not to set data into fields which did not exist in the previous version.
You will find it difficult to use the same JAXB classes to communicate UDS versions lower thian 10.0(1). In practice, it will usually not work, is not recommended, and cannot be supported.
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