By combining electronic messaging with timely and accurate shipping information, Endeavour can provide freight forwarders and shipping agents with an electronic one stop shop.
WebSQL comprises a series of internally developed Perl Libraries, IsqlPerl, and Informix ESQL/C to provide a full WWW <=> Database solution. Queries are generated dynamically, and the results formatted via a simple template language.
WebSQL is a cgi-bin application written in isqlperl. It comprises several libraries (perl include files) that handle various tasks such as parsing the cgi-bin input, generating and firing SQL statments, and formatting the output into HTML.
The program can be invoked by using either the POST or a GET methods. The syntax of the URL is simple:
/cgi-bin/WebSQL/[path/]template[?name=value[&name2=value2]]
The templates themselves can be very simple or very complex and as well as the formatting section, they can contain an SQL segment and a PERL segment.
Using the convention $name for variables, the name/value pairs passed in
become
instantiated within the template, and become meaningful within the context
they are used. Global and Environment variables such as the number of rows
returned or the name of the current users are also accessible
via the same mechanism.
The following TAGS define the formatting of the reponse from any query. Any
$name variables become instantiated from results of the query, if they are
valid column names, or the original input values.
An example WebSQL template is shown below. WebSQL has been extended be to handle far more sophisticated operations such as insert, delete and update. It is currently being used commercially for high volume data entry. Shipping schedules for almost all Australian containerised shipping, (as printed in the "Daily Commercial News"),are being updated daily via a WWW Browser Interface.
However, providing an elegant, centralised mechanism by which to update a database on line is only part of the larger picture - that of sending electronic business messages between trading partners, across disparate networks and communication mediums.
The next problem is to extract from such a database the values required to generate a message, massage the data into a structured message, and then transmit the message - taking into account acknowledgements, error reporting and logging. This is where WebEDI comes in.
EDI messages are comprised of GROUPS containing SEGMENTS containing ELEMENTS, and are defined by a governing body such as the UNITED NATIONS with their UN/EDIFACT standard.
One of the most significant challenges was to map elements from the database to
the EDI message. For those who haven't seen such a beast,
click here to view an example invoice
UN/INVOIC
message.
Segments can denote the beginning or end of a message. Some can be repeated, and/or nested, according to the rules dictated by the message's definition. The defintion also defines whether a segement is compulsary, optional, or conditionally optional contingent upon its location within the message.
One way to overcome structural incompatabilities between a Relational Database and an EDI Message, is to map the structure between segments and tables exactly. However, while this approach may work in a closed environment, managing a busy bureau service requires greater flexibility. Furthermore, the structure of a given message may not represent the relational requirements of a business model.
To ovecome this mapping problem there are two steps. One, a mapper table
, which is used by WebEDI to map database.table.field to
message.group.segment.element.
The second step is to program the conditional, and control statements in the translator (A program that typically converts a flat file to an EDI message)
For Electronic Data Interchange EDI,TEDIS use a product from TELECOM Finland called EDISERVER. The client/server architecture of EDISERVER provides open, event driven, fully automated, application to application EDI messaging.
EDISERVER provides a "C like" programming language (TCL) and a pre-processor to compile it. Similarly, Informix's ESQL/C provides a 4GL and pre-processor for its C API (Application Programming Interface). WebEDI is then a bridging technology that sits between the Database and EDI translator package to complete the chain in the Internet to EDI gateway.
Endeavour is not only a fully functional commercial shipping service - but is a proof of concept, creating opportunities for an endless combination of electronic trading solutions.
| Check Out our WebSites | |||
|---|---|---|---|
|
Endeavour Trade and Transport Information Service |
Printforce Australian Property Database |
Kompass Australian Company Information |
Example WebSQL template (Back)
<SQL>
SELECT port_name,vessel_name,voyage_number, arrival_date
FROM visits
WHERE
port_name matches "$port_name"
AND
vessel_name matches "$vessel_name"
ORDER BY 1,4,2
<PERL>
sub upper_first{
$_[0] =~ s/(\w+)/"\u\L$1"/ge;
return $_[0];
}
<FIRST ROW>
<TITLE>
My Simple WebSQL Template
<TITLE>
<H2> Ships In Port </H2>
<BEFORE GROUP OF "$port_name">
<H3>$Port: <I> &upper_first("$port_name") </I> </H3>
<UL>
<EVERY ROW>
<LI> &upper_first("$vessel_name") ($voyage_number) - $arrival_date
<AFTER GROUP OF $port_name>
</UL>
<LAST ROW>
<FONT SIZE=2>
(C) Copyright TEDIS 1996
</FONT>
/cgi-bin/WebSQL/example1?port_name=BRIS*&vessel_name=A*
Ships In PortPort: Brisbane
(C)© TEDIS, 1996 |
Example EDI Message (Back)
UNH+001+INVOIC:D:94B:UN' UNG+INVOIC+SENDERID+RECEIVEID+960625:1016+INVOIC+UN+94:B' BGM+381++9' DTM+3:19960625:101' RFF+AAM:615-02454966' RFF+BH:30662' NAD+VN++YOUNG STREET:WATERLOO N.S.W. 2017+ROWE FABRICS PTY LTD+++++AU' NAD+BY++CHARLES PARSONS (N.Z.):29 UNION STREET:AUCKLAND 1+ROWE FABRICS+++++NZ' TDT+20+PN0973+40' LOC+9+AUSYD' LOC+11+NZAKL' TOD++FOB+106' PAC+37' MEA+WT+AAG+KGM' LIN+1++1:VP' IMD+++:::Polyester/cotton fabric' QTY+47:0:M2' ALI+THA+3' MOA+203:0:AUD' PRI+NTP:205.59' RFF+SS' DTM+133:960121:101' UNS+S' MOA+77:0' UNT+25+001' UNE+1+INVOIC'
| Pointers to Other Papers | ||
|---|---|---|
| Papers & posters in this theme | All Papers & posters | AusWeb96 Home Page |
AusWeb96 The Second Australian WorldWideWeb Conference"ausweb96@scu.edu.au"