- |
Using UD6 for EDI/XML Data Interchange
UD6 is a database that can be used with Uniface. Any data can be stored using UD6, including the Uniface repository (source code). However, there are some very good reasons for using UD6 for storing data that you want to interchange with other systems:
Doesn’t Uniface 7.2.05/06 come with an Import/Export facility for XML?
If you are using Uniface 7.2.05/06, there is an in-built XML import/export function, however its disadvantages include:
What's different between UD6 XML and Uniface 7.2.06/Uniface 8 XML Streams?
If you are using Uniface 7.2.06 or Uniface 8, there is an in-built facility for writing and reading XML files for the purpose of data interchange. This is named XMLSTREAMS. UD6 may be a better XML tool for you if you require:
Which versions of Uniface are supported?
All Uniface version 6, 7 and 8 versions are supported, on all platforms. Uniface 5 support can be provided when required.
What industry standards does UD6 conform to?
Since XML is designed for information interchange, compliance with relevant standards is your guarantee that your data will be readable by your client.
March Hare are continually improving the standards compliance of the UD6 product. Emphasis is placed on standards that are being implemented in commercial applications, like web browsers and XML parsers.
At the moment Microsoft’s interpretation of the W3C standards are the major ones supported, which gives our users access to all of Microsoft’s XML tools. As the final drafts of the W3C standards are approved and implemented in commercial applications, March Hare will provide driver option settings for users to indicate which data format they wish to use, either IE5, or W3C.
Our intention is to support the following standards:
Links to Microsoft’s documentation of their implementations are:
March Hare will also support the dynamic generation of XSL/XSLT when UD6 is used to store the Uniface repository (the Microsoft XSL standard is the only one currently supported). For information on how to use UD6 with Microsoft’s MSXML3.DLL (XML SDK) click here.
How do I store data in XML?
Firstly you need to download and install the March Hare UD6 driver from http://march-hare.com
Then follow this simple example, which stores user entered data in XML format:
Here is our example data model:
What modifications do I make to my assignment file?
You need to add a line in the driver options settings, and a line in the Entities section to indicate which entities you will store in XML format. In this example, all the entities in the application model (Conceptual Schema) MYAPP are stored in XML format, in a file called MYAPP.XML.
The driver setting xmlschema ie5 tells the driver that it should automatically create a file called myappSchema.XML which describes the data in the MYAPP.XML file. NOTE: The relationship information is stored in the MYAPP.XML file as XLINK tags.
[ENTITIES]
*.MYAPP $ud6:MYAPP.*
[DRIVER_SETTINGS]
USYS$UD6_PARAMS=xmlschema ie5
What is the ud6 xlink file, and what changes do I make to it?
The xlink file is a ud6 configuration file that is stored (by default) in the Uniface bin directory. It contains a list of entity relationships that are then used to create XLINK tags in the XML data file.
CUSTOMER:CUSID:ADDRESS:CUSID:cusaddress::::*
CUSTOMER:CUSID:INVOICE:CUSID:cusinvoice::::*
ADDRESS:CUSID:CUSTOMER:CUSID:parent::::*
INVOICE:CUSID:CUSTOMER:CUSID:parent::::*
INVOICE:INVID:INVLINE:INVID:detail::::*
INVLINE:INVID:INVOICE:INVID:parent::::*
Write and compile then run a Uniface form component
In our example, we make a form component where a user enters the data to be stored. However, any Uniface proc can be used, just treat the entity being stored in XML format just like any other entity in a database. To copy fields from one entity to another use the getlistitems/putlistitems proc statements.
What does the data look like ?
Click here for the MYAPP.XML file generated from the above example
Click here for the myappSchema file generated from the above example:
How do you dynamically alter the filename ?
This is accomplished by sending the UD6 driver an instruction using the sql proc statement. For example, using the form component defined earlier, to name the file EDIFILE.XML, we added this code to the form’s execute trigger:
sql ":MYAPP:none:EDIFILE.XML","ud6"
edit
Further Information
Unicode Support in UD6/CMtool
How the driver works with Source Code Control
Using UD6 with Microsoft XML Software Development Kit
Format of the files
Modifying the XML files directly
Differences between UD6/CMtool and UD7/XML-DATA and W3C XML-DATA format
UD6 Overview
How to use the driver with a configuration management solution
$Revision: 1.7.4.3 $ $Date: 2003/09/16 17:52:05 $ | [zum Seitenanfang] |