next up previous
Next: Wrapper Result Format Up: Generic Wrapper Design Previous: Generic Wrapper Design

Syntax of the Wrapper Interface Language

The wrapper interface language allows external clients to request wrapper services and queries in a format that is understandable by the wrapper manager. Currently, wrapper invocation expressed in the wrapper interface language format is in the form of a URL to the wrapper which can then be used to invoke the wrapper. A BNF-like description for a HTTP URL looks like this:

       httpurl  = "http://" hostport [ "/" hpath [ "?" search ]]

The hostport is the Internet hostname of the machine where the wrapper is located, the hpath is the unix-like filesystem path to the wrapper script, and the search field is where the wrapper service commands and data are embedded.

In compliance with HTTP protocol, all spaces must be replaced by a `+', and all variable names and values in the search field must have their special characters encoded with their hexadecimal equivalent prefixed with a `%'. The special characters which must be encoded are:

       $ < > `` '' # % { } | ^ ~ [ ] ; \ ? : @ = & $

For example, the following query

       query=select * where symbols=@?#

must be encoded as:

        query=select+*+where+binarycode=%40%3F%23

The wrapper services include: insert, delete, select, createclass, destroyclass, getclassinfo, getexportschema, and reqvariablesinfo. Each service request maps directly to one of the generic functions in the generic function suite (See [16] for a detailed description). A fragment of our wrapper interface language syntax is provided as follows:

        wrapperSyntax ::= http://<wrapper path>?<DIOM Request>
        <DIOM Request> ::= service=<service type>&<variable list>
        <service type> ::= insert | delete | select | createclass |
destroyclass
                           | getclassinfo | getexportschema | reqvariablesinfo
        <variable list> ::= <variablename> | <separator> | <variable list>
        <variablename>  ::= attlist=<attname1> <attname2>.. |
                            classlist=<classname1> <classname2>.. |
                            condition='<conditionstring>' |
                            value=<name1> '<valuestring1>' <name2> '<valuestring2>'...

For a given subquery: select * from jobs where company_name="IBM", the Diorama Services Manager will encode this query into the the following URL using the wrapper interface syntax (note that this URL is an actual continuous string):

           http://www.test.ca/~diom/wrapper/service.cgi?
           service=select&attlist=*&classlist=Job&condition='company_name="IBM"'

This URL represents a wrapper service call which contains the encoded DIOM-IQL query plus any extra variables, and points to the network address of the corresponding wrapper CGI-Script. For this example, the requested service is a select, the class to query is Job, the attributes to return are all (` *') from Job, and the query condition is company_name=``IBM''.



next up previous
Next: Wrapper Result Format Up: Generic Wrapper Design Previous: Generic Wrapper Design



Ling Liu
Thu Aug 15 17:49:43 MDT 1996