cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
171
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Ned Morley on 24-07-2012 03:36:27 PM
Can anyone direct me to the specific xml schema xsd for the various response types within quad? Id like to autogenerate classes in a variaty of languages and can be constructed using the xml response.
I can create xsd based on the xml in the documentation but if the example xml is not complete in terms of possible multiple occurances of particular elements then there is a possiblility of a parsing error at runtime if a particular element is actually a collection rather than and individual element.
I checked the documentation but could not find a reference to xsd for the responses.

Subject: RE: XSD files for various xml response types in REST API
Replied by: Ned Morley on 27-07-2012 03:56:49 PM
Thanks,
Ive been able to parse as you show above to the entry level and then I have taken examples of the various entry xml such as post comment and user. Based on those i can user the xsd.exe tool in .net to generate xsd and then from that generate clases for which this xsd is parseable. Currently, this works for my simple tests, but there is always the possibility (that at 100% now) that I have not included all of the possible xml elements in my example and hence could get parse errors for xml containing unrecognized tags.

It would certainly be nice to be able to be confident that I have all accounted for contractually.

Thanks for your input.

Subject: RE: XSD files for various xml response types in REST API
Replied by: Adrienne Moherek on 27-07-2012 03:14:07 PM
Hi Ned,

A REST response may contain a payload. Each service endpoint will determine the actual data/ object inside the body of the response.

Here is the schema of the response in XML format:

 1<?xml version="1.0" encoding="utf-8"?>
 2<response xmlns="http://quad.cisco.com/ns/1.0/xml">
 3
 4  <statusCode></statusCode>
 5  <itemsPerPage></itemsPerPage>
 6  <startIndex></startIndex>
 7  <totalResults></totalResults>
 8  <filtered></filtered>
 9  <sorted></sorted>
10 
11  <entry>
12
13    [entry from service endpoint]
14
15  </entry>
16</response>


We currently do not have an XSD for all XML responses. I can find out for you if this will be considered in the future.

Thanks,
Adrienne
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links