Please join your peers on either March 26 (8pm GMT) or March 28 (8am GMT) to watch as user extraordinaire and forum legend @"lindsay.stevens" demonstrates OpenClinica Insight.

See preview and register at

Insight makes it easy to ask questions of ALL of your clinical and operational data and visualize answers via interactive reports and dashboards. The idea is simple, but the results are powerful: ask your questions, choose your visualizations, then return often for updated, interactive results that link you to all of the underlying data.

How do we validate OpenClinica's REST XML responses?

richard.morrisonrichard.morrison Posts: 3
When we use the API to make requests to /OpenClinica/rest/clinicaldata/xml/view/*/*/*/* we successfully obtain xml data.

We want to be rigorous and validate the XML, so we are looking at the declarations at the top and they declare this: xsi:schemaLocation=" OpenClinica-ODM1-3-0-OC2-0.xsd"

...which means that OpenClinica-ODM1-3-0-OC2-0.xsd should be used to validate the XML in the given namespace.

OpenClinica support have sent us links to several different schema files with that name, most recently this one:

So we checked out the code from github to obtain the .xsd. We still get validation errors when validating OpenClinica's XML against this schema. Specifically, lxml is telling us that the API response XML contains a "<SectionDetails/>" node when the schema expects a "<SectionDetailsDefinition />" node (see line 199)

Has anyone successfully validated the XML coming out of the API? What schema is the correct one to use?

Things we have tried:
  • contacting support
  • searching the forums
  • various versions of the schema
  • stripping out nodes and attributes in the namespace The XML then validates - which implies the rest of the XML data is valid and that the problem is OpenClinica related, not CDISC related
Be grateful for any help and pointers.


Sign In or Register to comment.