CommonData Web Services |
Contents:
1.0 Introduction
2.0 How to access it?
3.0 Listings |
| 1.0 Introduction: |
CommonDataHub offers the capability to retrieve data as xml or delimited content. This data can be used by downstream systems. The feature can be accessed in 2 ways:
|
|
| 2.0 How to access it? |
2.1 CommonDataHub Web Services API:
CommonDataHub Web Services API currently hosts one service, getData which returns data based on the input received. The CDH web service WSDL document can be accessed from: http://www.commondatahub.com/services/commondata?wsdl
The basic functioning of a web service client differs from vendor to vendor. However the following procedure outlines the core steps for any web service client to interact with the web service provider through wsdl. |
| a. |
Specify the path for the CDH WSDL document in the client program. |
| b. |
Select the getData service from the list of services. |
| c. |
Specify the input xml in text area provided for the input specification. |
| d. |
Retrieve the data from the response message. |
For details on the input xml & tag specifications see the Input XML Tag Specification
|
| Web Service response data can be obtained in the following forms based on the input specification: |
| a. |
As XML string in the SOAP response message*. |
| b. |
As XML file attached with the SOAP response message. |
| c. |
AS DELIMITED content in a text file attached with the SOAP response message. |
| * If the size of the response is huge or if the response is in the form of delimited content, the response data will be sent only as attachments. Only XML content can be sent as part of the response message. |
|
| Note: |
- All forms of response returned as attachments from the CommonDataHub Web Services will be UTF-8 encoded. So please make sure that the encoding is maintained while retrieving/processing the response data from CDH. This will ensure proper display all the characters in the response & additionally avoid any loss of data.
- Some of the third party web service client applications do not support new line characters in the input xml when specified in the text area for input xml. In these scenarios remove all the new line characters from the input xml & call the service.
- If the input xml is specified inside the SOAP message directly, wrap the entire input xml within a CDATA section.
- One CDATA section cannot be specified inside another CDATA section. So in scenarios where the third party web service client requires that the input xml be wrapped inside a CDATA section, the input tags that takes in special characters, cannot be specified within another CDATA sections. In these scenarios try using the default options (see section 3.1) or use special characters, which would not break the document structure if specified without the CDATA.
- Please make sure that the web service client program being used supports attachments & can handle attachments in huge sizes.
|
| 2.2 CommonDataHub Web Front-End:
To access the getData web service directly from the CommonDataHub front, CDH Web Service Front-End can be used. CommonDataHub Web Service Front-End provides the response as a downloadable file link. |
| Steps: |
| a. |
Select the dataset. |
| b. |
Select the desired file output format. |
| b. |
Select a template from the list of available templates for the selected dataset & view the input xml specification. |
| c. |
Click on the “Retrieve Data” button to submit the input xml & get the response as a downloadable file link. |
| d. |
Click on the link to start the download. |
| e. |
Based on the number of records retrieved, Open/Save the content to the client browser/machine. |
| The CommonDataHub Web Service Front-End can also be used for the following: |
| 1. |
A platform to validate the input xml defined by users. Any input specification that works in the CDH web Front-End, should work with any third party web service client application trying to access the CDH web service directly. |
| 2. |
Sample input xml documents have been provided here, which can be used by users as a reference documents while defining custom input xml. |
| 3. |
The text area for the Input XML Specification in the CDH Web Service client is editable & users can modify/customize the sample input xml specifications as required. |
| Note: |
- Blank white spaces are not permitted inside the input xml specification tags.
- Directly opening large files on the client machine may slow down the computer. Always save the file on to the client machine before using it.
|
|
| 3.0 Listings: |
| 3.1 Input XML Tag Specification: |
|
| 3.2 XSD for the Input/Output specification: |
|