.. _webservice:
Using web services
==================
Kiln can interact with external web services that return XML by making
HTTP requests with POSTed data. This is done using Cocoon's `CInclude
Transformer`_. There are three parts to the process, as follows:
1. Create a base query file (in ``assets/queries``) that contains all
of the static data for the request, and placeholders for dynamic
data. For example:
.. code-block:: xml
http://www.example.org/gate/ner-service/
method
POST
source
2. Write an XSLT to provide any dynamic data to the query. For
example:
.. code-block:: xml
path/to/tei/directory/
3. Create a pipeline for making the request and display the
result. For example:
.. code-block:: xml
.. _CInclude Transformer: http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html