OWLlink:
HTTP/XML Binding

Version 1.0
Working Group Recommendation October 2009

This version:
http://www.owllink.org/owllink-httpxml-20091016/
Latest version:
http://www.owllink.org/owllink-httpxml/
Previous version:
http://www.owllink.org/owllink-httpxml-20081001/
Authors:
Olaf Noppens, Ulm University
Thorsten Liebig, Ulm University
Marko Luther, DOCOMO Euro-Labs Munich
Timo Weithöner, formerly 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

This version of the OWLlink structural specification refers to the public OWL 2 Proposed Recommendation as of 22 September 2009 (http://www.w3.org/TR/2009/PR-owl2-syntax-20090922/) and will be aligned with the Recommendation (which is expected to be published late October).

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-20091016.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 redefined 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="owl2-20090611.xsd"/>
    <xsd:import namespace="http://www.owllink.org/owllink-xml"
                   schemaLocation="http://www.owllink.org/owllink-xml-20091016.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-20091016.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="owl2-20090611.xsd"/>
    <xsd:import namespace="http://www.owllink.org/sample-xml#"
                   schemaLocation="sample-xml-def-20091016.xsd"/>
    
    <xsd:redefine schemaLocation="http://www.owllink.org/owllink-xml-20091016.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/examples/

4.1 Introspecting Reasoner Capabilities

To introspect reasoner capabilities OWLlink offers the GetDescription request. Both the
request and response are also availabe as download.
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#">
    <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 knowledgebases. 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-DL 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.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ResponseMessage [ 
<!ENTITY ole "http://www.owllink.org/owllink-ext-xml/"> ]>
<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-20091016.xsd">
    <Description name="MyOwnReasoner">
        <protocolVersion major="1" minor="0"/>
        <reasonerVersion major="1" minor="0" build="0"/>
        <Property key="appliedSemantics">
            <Datatype abbreviatedIRI="xsd:string"/>
            <Literal>direct</Literal>
        </Property>
        <Property key="ignoresAnnotations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Property key="ignoresDeclarations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Property key="supportedDatatypes">
            <List abbreviatedIRI="xsd:anyURI"/>
            <Literal>xsd:long</Literal>
            <Literal>xsd:int</Literal> 
            <Literal>xsd:nonPositiveInteger</Literal>
            <Literal>xsd:nonNegativeInteger</Literal>
            <Literal>xsd:short</Literal>
            <Literal>owl:real</Literal>
        </Property>
		<Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL DL</Literal>
                <Literal>OWL 2 EL</Literal>
            </OneOf>
            <Literal>OWL 2 EL</Literal>
        </Setting>
        <Setting key="uniqueNameAssumption">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <SupportedExtension identifier="&ole;retraction"/>
        <SupportedExtension identifier="&ole;told"/>
	<PublicKB kb="http://owllink.org/examples/KB1" name="Test KB 1"/>
	<PublicKB kb="http://owllink.org/examples/KB2" name="Test KB 2"/>
    </Description>    
</ResponseMessage>

4.2 Creating a Knowledge Base

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). The following request message can also be downloaded
here.
<?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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#" >
    <CreateKB kb="http://owllink.org/examples/KB_1"/>
    <Tell kb="http://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://owllink.org/examples/KB_1">
        <owl:Class IRI="A"/>
    </IsClassSatisfiable>
</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.

<?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-20091016.xsd">
    <KB kb="http://owllink.org/examples/KB_1"/>
    <OK/>
    <BooleanResponse result="true"/>
</ResponseMessage>
This response message can also be downloaded here.

4.3 Retrieving Settings

The actual settings for a Knowledge Base can be retrieved by sending a GetSettings message. The following request message can also be downloaded
here.
<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink-xml#"
    xsi:schemaLocation="http://www.owllink.org/owllink-xml#
                        http://www.owllink.org/owllink-xml-20091016.xsd">
    <GetSettings kb="http://owllink.org/examples/KB_1"/>
</RequestMessage>
The corresponding ResponseMessage will contain all settings of the specified Knowledge Base.
<?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-20091016.xsd">
    <Settings>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="&xsd:string">
                <Literal>OWL DL</Literal>
                <Literal>OWL 2 EL</Literal>
            </OneOf>
            <Literal>OWL 2 EL</Literal>
        </Setting>
        <Setting key="uniqueNameAssumption">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
    </Settings>
</ResponseMessage>
This response message can also be downloaded here.

4.4 Changing a Setting

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. The following request message can also be downloaded here.
<?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-20091016.xsd">
    <Set kb="http://owllink.org/examples/KB_1" key="selectedProfile">
        <Literal>OWL DL</Literal>
    </Set>
</RequestMessage>
If the Set has not been refused an OK will be returned, otherwise an Error.
<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink-xml#">
    <OK/>
</ResponseMessage>
This response message can also be downloaded here.

4.5 Declaring Prefixes

CreateKB allows for declaring prefixes. All abbreviated IRIs are then resolved with respect to the prefixes. The following request message can also be downloaded
here.
<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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#">   
    <CreateKB kb="http://owllink.org/examples/KB_2">
        <Prefix name="test:" fullIRI="http://www.owllink.orgtest/ont"/>
        <Prefix name="ont:" fullIRI="http://owllink.org/examples/ontologies/"/>
    </CreateKB> 
    <Tell kb="http://owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="ont:ClassA"/>
            <owl:Class abbreviatedIRI="test:ClassA"/>
        </owl:SubClassOf>
    </Tell>  
</RequestMessage>
If the CreateKB and the Tell are processed successfully the corresponding ResponseMessage will contain a KB and a OK response.
<?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-20091016.xsd">
    <KB kb="http:/owllink.org/examples/KB_2/>
    <OK/>
</ResponseMessage>
This response message can also be downloaded here.

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 LoadOntology request. The following request message can also be downloaded
here.
<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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#">    
    <CreateKB kb="http://owllink.org/examples/KB_3">
        <Prefix name="test:" fullIRI="http://www.owllink.orgtest/ont"/>
        <Prefix name="ont:" fullIRI="http://www.owllink.org/examples/ontologies/"/>
    </CreateKB>
    <LoadOntology kb="http://owllink.org/examples/KB_3">
        <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"/>
    </LoadOntology>    
    <Tell kb="http://owllink.org/examples/KB_3">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="ont:ClassA"/>
            <owl:Class abbreviatedIRI="test:ClassA"/>
        </owl:SubClassOf>
    </Tell>
</RequestMessage>
The corresponding response message contains a KB response as well as OK messages indicating that the LoadOntology respectively Tell requests have been successfully processed by the server. The response message can be downloaded here.
<?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-20091016.xsd">
    <KB kb="http://owllink.org/examples/KB_3"/>
    <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. The following request message can also be downloaded
here.
<?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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#" >    
   <CreateKB kb="http://owllink.org/examples/KB_4"/>
   <!-- Some tells in http://owllink.org/examples/KB_4 -->
    <Tell kb="KB_4">
        <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="http://owllink.org/examples/KB_4"/>
    <GetEquivalentClasses kb="http://owllink.org/examples/KB_4">
        <owl:Class IRI="D"/>
    </GetEquivalentClasses>
    <IsClassSubsumedBy kb="KB_4">
        <owl:Class abbreviatedIRI="owl:Thing"/>
        <owl:Class abbreviatedIRI="owl:Nothing"/>
    </IsClassSubsumedBy>
    <GetSubClasses kb="KB_4">
        <owl:Class IRI="C"/>
    </GetSubClasses>
  <!-- Some tells in KB_5 -->
    <CreateKB kb="http://owllink.org/examples/KB_5" name="MyKB_5"/>
    <Tell kb="http://owllink.org/examples/KB_5">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class IRI="B"/>
        </owl:SubClassOf>
    </Tell>
    <!-- KB Management -->
    <ReleaseKB kb="http://owllink.org/examples/KB_4"/>
    <!-- One more ask -->
    <GetAllClasses kb="http://owllink.org/examples/KB_4"/>
</RequestMessage>
The corresponding response message can also be downloaded here. 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.
<?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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#">    
    <KB kb="http://owllink.org/examples/KB_4"/>
    <!-- tell -->
    <OK warning="Duplicate axiom ignored: <owl:SubClassOf> <owl:Class IRI="C"/>
                    <owl:Class IRI="A"/><owl:SubClassOf>"/>
    <!-- asks -->
    <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="E"/>
    </SetOfClasses>
    <BooleanResponse result="false"/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
	<KB kb="http://owllink.org/examples/KB_5"/>
    <OK/>
    <!-- KB management -->
    <OK/>
    <!-- One more ask -->
    <KBError errorMessage="KB http://owllink.org/examples/KB_4 does not exist!"/>
</ResponseMessage>

4.8 Retrieving the Taxonomy

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] The request message can be downloaded here.
<?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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#">    
    <CreateKB kb="http://owllink.org/examples/KB_1"/>
    <GetSubClassHierarchy kb="http://owllink.org/examples/KB_1"/>
    <CreateKB kb="http://owllink.org/examples/KB_2"/>
    <Tell kb="http://owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class IRI="A"/> 
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
    </Tell>
    <CreateKB kb="http://owllink.org/examples/KB_3"/>
    <Tell kb="http://owllink.org/examples/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="http://owllink.org/examples/KB_4"/>
    <Tell kb="http://owllink.org/examples/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="http://owllink.org/examples/KB_2"/>
    <GetSubClassHierarchy kb="http://owllink.org/examples/KB_3"/>
    <GetSubClassHierarchy kb="http://owllink.org/examples/KB_4"/>
    <ReleaseKB kb="http://owllink.org/examples/KB_1"/>   
    <ReleaseKB kb="http://owllink.org/examples/KB_2"/>   
    <ReleaseKB kb="http://owllink.org/examples/KB_3"/>
    <ReleaseKB kb="http://owllink.org/examples/KB_4"/>   
</RequestMessage>
The corresponding response message contains responses for the management requests as well as the GetSubClassHierarchy request. It can also be downloaded here
<?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-20091016.xsd"
    xmlns:owl="http://www.w3.org/2002/07/owl#">   
    <KB kb="http://owllink.org/examples/KB_1"/>
    <ClassHierarchy>
       <ClassSubClassPair>
           <ClassSynset>
               <owl:Class abbreviatedIRI="owl:Thing"/>
           </ClassSynset>
           <SetOfClassSynsets></SetOfClassSynsets>
       </ClassSubClassPair>
    </ClassHierarchy>    
    <KB kb="http://owllink.org/examples/KB_2"/>
    <OK/>
    <KB kb="http://owllink.org/examples/KB_3"/>
    <OK/>
    <KB kb="http://owllink.org/examples/KB_4"/>
    <OK/>
    <ClassHierarchy>
        <ClassSubClassPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset> 
            </SetOfClassSynsets>
        </ClassSubClassPair>
    </ClassHierarchy> 
    <ClassHierarchy>
        <ClassSubClassPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassPair>
        <ClassSubClassPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>
                <ClassSynset>
                    <owl:Class IRI="D"/>
                </ClassSynset> 
            </SetOfClassSynsets>
        </ClassSubClassPair>   
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSubClassPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>   
            </SetOfClassSynsets>
        </ClassSubClassPair>
        <ClassSubClassPair>
            <ClassSynset>
                <owl:Class IRI="B"/>
            </ClassSynset>
            <SetOfClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="C"/>
                    <owl:Class abbreviatedIRI="owl:Nothing"/>
                </ClassSynset>
            </SetOfClassSynsets>
        </ClassSubClassPair>
    </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. W3C Proposed Recommendation 22 September 2009, http://www.w3.org/TR/2009/PR-owl2-xml-serialization-20090922/.
[OWLlink Structural Specification]
OWLLink: Structural Specification. Thorsten Liebig, Marko Luther, Olaf Noppens. Working Group Recommendation, October 2009, http://www.owllink.org/owllink-20091016/.
[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/.