OWLlink:
HTTP/XML Binding

Version 1.0
Working Group Recommendation 23 October 2009

This version:
http://www.owllink.org/owllink-httpxml-20091023/
Latest version:
http://www.owllink.org/owllink-httpxml/
Previous version:
http://www.owllink.org/owllink-httpxml-20081001/
Authors:
Olaf Noppens, Ulm University
Marko Luther, DOCOMO Euro-Labs Munich
Thorsten Liebig, Ulm University
Michael Wessel, Racer Systems GmbH
Contributors: (in alphabetic order)
Sean Bechhofer, The University of Manchester
Matthew Horridge, The University of Manchester
Ralf Möller, TU Hamburg
Boris Motik, Oxford University
Peter F. Patel-Schneider, Bell Labs Research, Alcatel-Lucent
Dmitry Tsarkov, The University of Manchester
Anni-Yasmin Turhan, TU Dresden
Timo Weithöner, formerly Ulm University

Abstract

The OWLlink interface provides an implementation-neutral mechanism for accessing OWL reasoner functionality. OWLlink relies on OWL 2 for the primitives of the modeling language, and is thus fully compatible with OWL. The set of OWLlink primitives described in this document cover basic reasoner managment, assertion of axioms and elementary ask functionality. An extension mechanism is provided in order to easily add any required functionality in a controlled way to the core language. This document defines a concrete binding of OWLlink into [HTTP/1.1] and [XML Schema]. A structural specification of OWLlink is given in an accompanying document [OWLlink Structural Specification].

Status of this Document

Summary of Changes

Since the latest Working Draft:

Please Comment

The OWLlink Working Group seeks public feedback on these Working Drafts. Please send your comments to public-comments@owllink.org or post to the public discussion forum at http://www.owllink.org/forum/.


Contents


1 Introduction

OWLlink is defined in terms of a structural specification [OWLlink Structural Specification]. The following describes a binding of the specification to a concrete communication protocol, namely XML over HTTP. Note that this is only one conceivable binding. Other bindings may utilize [SOAP] or another particular Remote Message Invocation protocol.

The HTTP/XML binding of OWLlink uses HTTP as its underlying communication protocol for exchanging XML content between a reasoner and a client. More technically, the reasoner has to accept HTTP POST requests and responds as appropriate according to the OWLlink specification. The requests as well as responses have to consist of XML data according to the OWLlink HTTP/XML Schema. The schema is obtained by a translation of the objects from the UML diagrams of the OWLlink specification according to the translation rules (see Section 2.2).

Note that the HTTP/XML binding is not intended to be backwards compatible with existing implementations of the [DIG 1.1] specification. However, it relies on the [OWL 2 XML Serialization] for the primitives of the ontology language, and is thus fully compatible with OWL. As a result, implementors of the XML binding of OWLlink can re-use their implementation of OWL 2 parsers to parse the OWL 2 specific contents of OWLlink primitives.

2 Binding

A common transport mechanism for communicating with an OWLlink server is through the [HTTP/1.1] protocol. XML is a verbose format and large Knowledge Bases may require a lot of information to be transferred over the wire. It has been observed with DIG 1.1 implementations that this can introduce a considerable overhead into the communication process. To alleviate this, OWLlink servers should support the use of compression, with message pay-loads being compressed before transfer. This may be realized by standard compression technology of the HTTP/1.1 transport mechanism. For instance, a server may include Content-Encoding: gzip in the header of each HTTP message to specify that the content has been compressed according to the gzip specification. Alternatively, an OWLlink HTTP/XML implementation could make use of methods developed within the Efficient XML Interchange initiative [EXI]

2.1 Sessions and Messages

An OWLlink session is mapped to an HTTP connection and is typically established upon sending the first request. HTTP servers are in general allowed to close the HTTP connection at their own discretion, which in effect terminates the OWLlink session. In order to prevent this from happening, the client can include the keepAlive in the header of each HTTP request it sends. Note that closing an OWLlink session does not imply the release of the Knowledge Base. OWLlink HTTP servers are required to recognize this HTTP header and implement its functionality according to the HTTP/1.1 specification.

Messages are sent using the HTTP POST requests. The content type for messages is text/xml. The Content-Length must be explicitly set and confirm to the HTTP standard.

2.2 XML Schema

The XML syntax for OWLlink is defined as an [XML Schema] within the following document.

<http://www.owllink.org/owllink-xml-20091023.xsd>

It has been obtained by a straightforward translation of the structural specification from the [OWLlink Specification] in the following way:

Certain global conditions on OWLlink XML documents that are related to the communication cannot be captured in an XML Schema, i.e. the correspondence of requests and responses. Furthermore, the root element of any OWLlink XML document written in this syntax must be either RequestMessage for bundling requests or ResponseMessage for bundling responses.

The XML schema presented in this document covers the entire OWLlink specification including all management, tell and ask primitives.

2.3 OWLlink Requests and Responses

Following a straightforward translation of the OWLlink specification into a XML schema the content body of a HTTP message is either the root element RequestMessage or a ResponseMessage containing requests resp. responses. Each Request need to be acknowledged with a Response element as described in the OWLlink specification document in the order matching with the order of the corresponding requests.

<RequestMessage>
    [request #1]
    [request #2]
    [ ... ]
    [request #n]
</RequestMessage>
<ResponseMessage>
    [response #1 (for request #1)]
    [response #2 (for request #2)]
    [ ... ]
    [response #n (for request #n)]
</ResponseMessage>

If a server cannot process a request, it should attempt to recover gracefully, and process other pending requests as if the error did not happen. If, however, this recovery is not possible, after sending the Error response, the server should close the OWLlink session. If the OWLlink client or server detects a violation of the HTTP protocol such as invalid headers, it should respond as specified in the HTTP standard and then close the HTTP connection, i.e. the OWLlink session.

3 Extensions

To enable the embedding of new requests and responses into XML messages, implementors should use the redefinition mechanism of XML Schema and extend the ol:Request and ol:Response element groups. We strongly encourage the definition of two files: one which contains the schema file of the new elements with a separate namespace and one file which redefines the OWLlink schema. Otherwise, if two different extensions directly extend the OWLlink schema without defining a new namespace it is not possible to use them at the same time because XML schema does not allow for the redefinition of two schemas at the same time.

For instance, let us assume that some extension defines a new Knowledge Base request and an additional request with a corresponding response. This extension can be defined in a separate XML schema file with a separate namespace.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:
ol="http://www.owllink.org/owllink-xml#"
    
targetNamespace="http://www.owllink.org/ext/sample-xml#" elementFormDefault="qualified"
    
attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/2002/07/owl#"
        
schemaLocation="http://www.w3.org/2009/10/owl2-xml.xsd"/>
    <xsd:import namespace="http://www.owllink.org/owllink-xml"
        
schemaLocation="http://www.owllink.org/owllink-xml-20091023.xsd"/>

    <!-- simple request without additional parameters -->
    <xsd:element name="NewRequest1" type="ol:Request"/>
    <!-- simple KBRequest without additional parameters -->
    <xsd:element name="NewKBRequest1" type="ol:KBRequest"/>

    <!-- complex request -->
    <xsd:element name="NewKBRequest2">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:KBRequest"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <!-- complex response -->
    <xsd:element name="NewResponse1">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:Response"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <!-- complex KBResponse -->
    <xsd:element name="NewKBResponse1">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:KBResponse"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

The next step is to redefine the OWLlink schema. It is not necessary to modify the original OWLlink file. Instead a new file (e.g., sample-xml-20091023.xsd) according to the following structure should be used:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:
ol="http://www.owllink.org/owllink-xml#"
    xmlns:
ext="http://www.owllink.org/sample-xml#"
    
targetNamespace="http://www.owllink.org/owllink-xml#"
    
elementFormDefault="qualified"
    
attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/2002/07/owl#"
        
schemaLocation="http://www.w3.org/2009/10/owl2-xml.xsd"/>
    <xsd:import namespace="http://www.owllink.org/sample-xml#"
        
schemaLocation="sample-xml-def-20091023.xsd"/>

    <xsd:redefine schemaLocation="http://www.owllink.org/owllink-xml-20091023.xsd">
        <xsd:group name="Request">
            <xsd:choice>
                <xsd:group ref="ol:Request"/>
                <xsd:element ref="ext:NewRequest1"/>
                <xsd:element ref="ext:NewKBRequest1"/>
                <xsd:element ref="ext:NewKBRequest2"/>
            </xsd:choice>
        </xsd:group>

        <xsd:group name="Response">
            <xsd:choice>
                <xsd:group ref="ol:Response"/>
                <xsd:element ref="ext:NewResponse1"/>
                <xsd:element ref="ext:NewKBResponse1"/>
            </xsd:choice>
        </xsd:group>
    </xsd:redefine>
</xsd:schema>

4 Examples

Here are several basic examples of OWLlink communication in accordance with this specification. All the examples can be downloaded at http://www.owllink.org/owllink-httpxml-20091023/examples/

4.1 Introspecting Reasoner Capabilities

To introspect reasoner capabilities OWLlink offers the GetDescription request.
owllink-example-GetDescription-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <GetDescription/>
</RequestMessage>

The answer response Description must contained the reasoner name (e.g. MyOwnReasoner), the version of the reasoner as well as of the supported OWLlink protocol. In addition, the answer has to consist of a set of supported settings (Setting element) and (read-only) properties (Property element) as well as the supported OWLlink extensions (Extension) and the public Knowledge Bases. For instance, in the following sample response message the reasoner states that it supports the following profiles: OWL 2 EL and OWL DL. In addition, OWL 2 EL is used as the profile for newly created Knowledge Bases by default. The default values can be overridden for each Knowledge Base separately as shown in Section 4.2 . The ignoresAnnotations Property informs that the reasoner ignores annotation and that this behavior can not be changed.

owllink-example-GetDescription-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ResponseMessage [
<!ENTITY ole "http://www.owllink.org/ext/">
]>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <Description name="MyOwnReasoner">
        <ProtocolVersion major="1" minor="0"/>
        <ReasonerVersion major="1" minor="0" build="0"/>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL DL</Literal>
                <Literal>OWL 2 EL</Literal>
            </OneOf>
            <Literal>OWL 2 EL</Literal>
        </Setting>
        <Property key="appliedSemantics">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>RDF-based</Literal>
            </OneOf>
            <Literal>RDF-based</Literal>
        </Property>
        <Property key="supportedDatatypes">
            <List abbreviatedIRI="xsd:anyURI"/>
            <Literal>http://www.w3.org/2001/XMLSchema#long</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#int</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#nonPositiveInteger</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#nonNegativeInteger</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#short</Literal>
            <Literal>http://www.w3.org/2002/07/owl#real</Literal>
        </Property>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <Property key="ignoresAnnotations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Property key="ignoresDeclarations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Setting key="uniqueNameAssumption">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <SupportedExtension identifier="&ole;retraction"/>
        <SupportedExtension identifier="&ole;told"/>
        <PublicKB kb="http://www.owllink.org/examples/KB_1" name="Test KB 1"/>
        <PublicKB kb="http://www.owllink.org/examples/KB_2" name="Test KB 2"/>
    </Description>
</ResponseMessage>

4.2 Creating Knowledge Bases

The following sample request starts with a CreateKB request in order to allocate a new Knowledge Base at the server. This is followed by a Tell request which asserts two subclass axioms to the new KB. Finally a single ask request checks the satisfiability of one of the classes introduced in one of the subclass axioms (IsClassSatisfiable).
owllink-example-CreateKB-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="http://www.owllink.org/examples/KB_1"/>
    <Tell kb="http://www.owllink.org/examples/KB_1">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class IRI="B"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class IRI="C"/>
        </owl:SubClassOf>
    </Tell>
    <IsClassSatisfiable kb="http://www.owllink.org/examples/KB_1">
        <owl:Class IRI="A"/>
    </IsClassSatisfiable>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>

According to the [OWLlink Structural Specification] every single Request must be acknowledged with a corresponding Response considering the ordered sequence of request elements. The CreateKB is acknowledged by a KB element, the Tell request is acknowledged by an OK response and the satisfiability ask is acknowledged by a BooleanResponse carrying a positive answer.

owllink-example-CreateKB-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK/>
    <BooleanResponse result="true"/>
    <OK/>
</ResponseMessage>

4.3 Retrieving Settings

The actual settings for a Knowledge Base can be retrieved by sending a GetSettings message.
owllink-example-GetSettings-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="http://www.owllink.org/examples/KB_1" name="KB 1"/>
    <GetSettings kb="http://www.owllink.org/examples/KB_1"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>
The corresponding ResponseMessage will contain all settings of the specified Knowledge Base.
owllink-example-GetSettings-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <Settings>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL 2 QL</Literal>
                <Literal>OWL 2 RL</Literal>
            </OneOf>
            <Literal>OWL 2 RL</Literal>
        </Setting>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>false</Literal>
        </Setting>
    </Settings>
    <OK/>
</ResponseMessage>

4.4 Changing Settings

Set allows to modify a KB setting. All available settings as well as their default value can be inspected using GetDescription as shown in Section 4.1 Introspecting Reasoner Capabilities.
owllink-example-Set-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="http://www.owllink.org/examples/KB_1" name="KB 1"/>
    <Set kb="http://www.owllink.org/examples/KB_1" key="abbreviatesIRIs">
        <Literal>true</Literal>
    </Set>
    <GetSettings kb="http://www.owllink.org/examples/KB_1"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>
If the Set has not been refused an OK will be returned, otherwise an Error.
owllink-example-Set-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK/>
    <Settings>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL 2 QL</Literal>
                <Literal>OWL 2 RL</Literal>
            </OneOf>
            <Literal>OWL 2 RL</Literal>
        </Setting>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
    </Settings>
    <OK/>
</ResponseMessage>

4.5 Declaring Prefixes

CreateKB allows for declaring prefixes. All abbreviated IRIs are then resolved with respect to the prefixes.
owllink-example-Prefix-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE RequestMessage [
<!ENTITY ont "http://www.owllink.org/examples/myOntology#"> ]>

<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="http://www.owllink.org/examples/KB_2">
        <Prefix name="test" fullIRI="http://www.owllink.org/test/ont#"/>
        <Prefix name="myOnt" fullIRI="http://www.owllink.org/examples/myOntology#"/>
    </CreateKB>
    <Tell kb="http://www.owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="test:A"/>
            <owl:Class abbreviatedIRI="myOnt:A"/>
        </owl:SubClassOf>
    </Tell>
    <Set kb="http://www.owllink.org/examples/KB_2" key="abbreviatesIRIs">
        <Literal>false</Literal>
    </Set>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="&ont;A"/>
    </GetSubClasses>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class abbreviatedIRI="myOnt:A"/>
    </GetSubClasses>
    <Set kb="http://www.owllink.org/examples/KB_2" key="abbreviatesIRIs">
        <Literal>true</Literal>
    </Set>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="http://www.owllink.org/examples/myOntology#A"/>
    </GetSubClasses>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="A"/>
    </GetSubClasses>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_2"/>
</RequestMessage>
If the CreateKB and the Tell are processed successfully the corresponding ResponseMessage will contain a KB and a OK response.
owllink-example-Prefix-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="http://www.owllink.org/examples/KB_2"/>
    <OK/>
    <OK/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class IRI="http://www.owllink.org/test/ont#A"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class IRI="http://www.owllink.org/test/ont#A"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <OK/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="test:A"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="test:A"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <OK/>
</ResponseMessage>

4.6 Loading Ontologies

The following example demonstrates that it is possible to create a Knowledge Base and fill it with both (i) axioms of ontologies loaded directly from their location and (ii) directly transmitted axioms. Note that the prefix declared for the Knowledge Base are not considered when executing the LoadOntologies request.
owllink-example-LoadOntologies-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="http://www.owllink.org/examples/KB_1">
        <Prefix name="test:" fullIRI="http://www.owllink.org/test/ont#"/>
        <Prefix name="myOnt:" fullIRI="http://www.owllink.org/examples/myOntology#"/>
    </CreateKB>
    <LoadOntologies kb="http://www.owllink.org/examples/KB_1">
        <OntologyIRI IRI="http://www.owllink.org/examples/ontologies/myOntology"/>
        <OntologyIRI IRI="http://www.owllink.org/examples/ontologies/myOntology2"/>
        <IRIMapping key="http://www.owlllink.org/examples/ontologies/myOntology"
            
value="file:///examples/ontologies/myOntology"/>
    </LoadOntologies>
    <Tell kb="http://www.owllink.org/examples/KB_1">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="test:A"/>
            <owl:Class abbreviatedIRI="myOnt:A"/>
        </owl:SubClassOf>
    </Tell>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>
The corresponding response message contains a KB response as well as OK messages indicating that the LoadOntologies respectively Tell requests have been successfully processed by the server.
owllink-example-LoadOntologies-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK/>
    <OK/>
    <OK/>
</ResponseMessage>

4.7 Pooling Requests

The following example demonstrates that it is possible to pool tell and ask operations for different Knowledge Bases within one RequestMessage. This is useful, say for test-suites or benchmarking. The following request creates the a first KB, adds OWL axioms, poses queries, and then one creates a second one. Note that the next to last request will release only the first Knowledge Base: for that, the last ask will produce an error because the KB it is referring to is no longer available.
owllink-example-PoolingRequests-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="KB_1"/>
    <!-- Some tells in KB_1 -->
    <Tell kb="KB_1">
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="C"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:EquivalentClasses>
            <owl:Class IRI="D"/>
            <owl:Class IRI="E"/>
        </owl:EquivalentClasses>
        <owl:ClassAssertion>
            <owl:Class IRI="A"/>
            <owl:NamedIndividual IRI="iA"/>
        </owl:ClassAssertion>
        <owl:SubClassOf>
            <owl:Class IRI="C"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
    </Tell>
    <!-- Some asks -->
    <GetAllClasses kb="KB_1"/>
    <GetEquivalentClasses kb="KB_1">
        <owl:Class IRI="D"/>
    </GetEquivalentClasses>
    <IsClassSubsumedBy kb="KB_1">
        <owl:Class abbreviatedIRI="owl:Thing"/>
        <owl:Class abbreviatedIRI="owl:Nothing"/>
    </IsClassSubsumedBy>
    <GetSubClasses kb="KB_1">
        <owl:Class IRI="C"/>
    </GetSubClasses>
    <!-- Some tells for the public KB named 'MyKB_2' -->
    <CreateKB kb="KB_2" name="MyKB_2"/>
    <Tell kb="KB_2">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class IRI="B"/>
        </owl:SubClassOf>
    </Tell>
    <!-- KB Management -->
    <ReleaseKB kb="KB_2"/>
    <ReleaseKB kb="KB_1"/>
    <!-- One more ask -->
    <GetAllClasses kb="KB_1"/>
</RequestMessage>
Note that the request message contains a repetition of an axiom and therefore the OWLlink server acknowledges the Tell with a warning. The response to the last request has to be an Error because KB_1 has been released before.
owllink-example-PoolingRequests-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="KB_1"/>
    <OK warning="Duplicate axiom ignored"/>
    <SetOfClasses>
        <owl:Class IRI="A"/>
        <owl:Class IRI="B"/>
        <owl:Class IRI="C"/>
        <owl:Class IRI="D"/>
        <owl:Class IRI="E"/>
    </SetOfClasses>
    <SetOfClasses>
        <owl:Class IRI="D"/>
        <owl:Class IRI="E"/>
    </SetOfClasses>
    <BooleanResponse result="false"/>
    <SetOfClassSynsets/>
    <KB kb="KB_2"/>
    <OK/>
    <OK/>
    <OK/>
    <KBError error="KB_1 does not exist!"/>
</ResponseMessage>

4.8 Retrieving Taxonomies

The following example shows how to retrieve the class-subsumption hierarchy of a KB. In this example four Knowledge Bases are creates and the class-subsumption hierarchy is requested for each of them. Note that these four KBs correspond to the example KB introduced in Section '5.3.2 Retrieving the Class Hierarchy' [OWLlink Structural Specification]
owllink-example-Taxonomy-request-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <CreateKB kb="KB_1"/>
    <CreateKB kb="KB_2"/>
    <Tell kb="KB_2">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
    </Tell>
    <CreateKB kb="KB_3"/>
    <Tell kb="KB_3">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="D"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
    </Tell>
    <CreateKB kb="KB_4"/>
    <Tell kb="KB_4">
        <owl:EquivalentClasses>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:EquivalentClasses>
        <owl:EquivalentClasses>
            <owl:Class IRI="C"/>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </owl:EquivalentClasses>
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
    </Tell>
    <GetSubClassHierarchy kb="KB_1"/>
    <GetSubClassHierarchy kb="KB_2"/>
    <GetSubClassHierarchy kb="KB_3"/>
    <GetSubClassHierarchy kb="KB_4"/>
    <ReleaseKB kb="KB_1"/>
    <ReleaseKB kb="KB_2"/>
    <ReleaseKB kb="KB_3"/>
    <ReleaseKB kb="KB_4"/>
</RequestMessage>
The corresponding response message contains responses for the management requests as well as the GetSubClassHierarchy request.
owllink-example-Taxonomy-response-20091023.xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
      http://www.owllink.org/owllink-xml-20091023.xsd"
>

    <KB kb="KB_1"/>
    <KB kb="KB_2"/>
    <OK/>
    <KB kb="KB_3"/>
    <OK/>
    <KB kb="KB_4"/>
    <OK/>
    <ClassHierarchy>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets/>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassesPair>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>
                <ClassSynset>
                    <owl:Class IRI="D"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassesPair>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="B"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="C"/>
                    <owl:Class abbreviatedIRI="owl:Nothing"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <OK/>
    <OK/>
    <OK/>
    <OK/>
</ResponseMessage>

5. References

[DIG 1.1]
The DIG Description Logic Interface: DIG/1.1. Sean Bechhofer. Technical Report, Feb 2003, http://dl-web.man.ac.uk/dig/2003/02/interface.pdf.
[EXI]
Efficient XML Interchange Format 1.0 John Schneider and Takuki Kamiya. W3C Working Draft, March 2008.
[HTTP/1.1]
Hypertext Transfer Protocol - HTTP/1.1, Request for Comments 2616. R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee.
[OWL 2 XML Serialization]
OWL 2 Web Ontology Language: XML Serialization Boris Motik, Bijan Parsia, Peter F. Patel-Schneider, eds. W3C Recommendation, 27 October 2009, http://www.w3.org/TR/2009/REC-owl2-xml-serialization-20091027/. Latest version available at http://www.w3.org/TR/owl2-xml-serialization/.
[OWLlink Structural Specification]
OWLlink: Structural Specification Thorsten Liebig, Marko Luther, Olaf Noppens, Michael Wessel. Working Group Recommendation, 23 October 2009, http://www.owllink.org/owllink-20091023/. Latest version available at http://www.owllink.org/owllink/.
[SOAP]
SOAP Version 1.2 Part 1: Messaging Framework (Second Edition). M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. F. Nielsen, A. Karmarkar, Y. Lafon, eds. W3C Recommendation 27 April 2007, http://www.w3.org/TR/2007/REC-soap12-part1-20070427/.
[XML Schema]
XML Schema Part 1: Structures Second Edition. Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, eds. W3C Recommendation 28 October 2004, http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/.