An Overview of the Sample Programs in the OBOE Package
Copyright 2006 - American Coders, Ltd.
Raleigh NC USA
Author: Joe McVerry
WORK IN PROGRESS
Last updated 2006-11-30.
Alphabetical List of Sample Programs.
The purpose of this document is to discuss using the OBOE sample programs from the command line.
With a few exceptions the programs in the samples directory are designed to be run from a command line. The command
line call is always to the java executable. Most of the programs, if not all, use several command line arguments
that may or may not be required. Usually the argument is a filename. Several of the programs will simply write
the results to the System.out file, which you can capture using the command line piping character of your
operating system. And all of the programs are part of the package com.americancoders.samples. So to execute from a
command line you would have something like:
java com.americancoders.samples.SampleProgram blah blah blah
Notes:
Don't forget to include the log4j package.
build997
Purpose:
Builds an X12 997 message based on an incoming X12 message. The response
message is written to System.out.
This program was written to show programmers how to use the OBOE API. Not suprisingly is does have a purpose to
some end users and is in use in production.
Arguments:
- edi data file name - pathname to an incoming X12 message. Required
Format
java com.americancoders.samples.build997 /incomingdirectory/filename
Notes
Refer to the Working the OBOE API document for more discussion of this program
EdifactExample
Purpose:
Converts an EDIFACT message into the OBOE validatable XML file
Arguments:
- EDI data file name - pathname to an incoming EDIFACT message Required
- XML output file name - pathname for the resulting XML Required
Format
java com.americancoders.samples.EdifactExample /incomingdirectory/filename /xmlDirectory/output.xml
Notes
EDIMailCall
Purpose:
Stand alone server to handle incoming and outgoing X12 messages. Originally designed to work
with the EDIINT AS1 specifications. This is not a full implementation of AS1 but it does work.
Arguments:
- hostid - the name of your incoming mail server. Required
- userid - mail id to get mail. Required
- password - password on server for mail id. Required
- senduserid - mail id to send mail. Required
- mailServerProtocol - imap | pop3. Required
Format
java com.americancoders.samples.EDIMailCall myserver.com myid mypassword myid pop3
Notes
See How To Use OBOE document for more information about setting
up parameters in the OBOE.properties file
FileConverter
Purpose:
This program attempts to read in EDI messages and converts them to one of several different formats.
Arguments:
- inputtype - (single character). Required
- x - X12
- e - EDIFACT
- w - well formed OBOE XML
- v - validatable OBOE XML.
- inputfilename - pathname to an existing file in format as specified above. Required
- outputtype - (single character) . Required
- x - X12
- e - EDIFACT
- w - well formed OBOE XML
- v - validatable OBOE XML.
- outputfilename - where output is to be written, if not specified file written to System.out. Optional
Format
java com.americancoders.samples.FileConvert x /incomingdiretory/filename v
Notes
Converting from X12 to EDIFACT or vice versa is not logical.
ParseEnvelope
Purpose:
Yet another generic routine to take an incoming EDI message and convert it to OBOE's valid XML format.
Arguments:
- inputfilename - pathname to an existing fileRequired
Format
java com.americancoders.samples.ParseEnvelope /incomingdiretory/filename
Notes
Application will throw a NullPointerException if no argument is specified
SampleEDIFactDocumentHandler
Purpose:
Another converter, but the program's real purpose is to show you how to write an OBOE document handler.
The output is written to System.out and is in the OBOE well-formed XML format.
Arguments:
- inputfilename - pathname to an EDIFACT file. Required
Format
java com.americancoders.samples.SampleEDIFactDocumentHandler /incomingdiretory/filename
Notes
Application will throw a NullPointerException if no argument is specified
SampleEDIFactDocumentHandlerAndViewer
Purpose:
Another converter, but the program's real purpose is to show you how to write an OBOE document handler.
The output is written to a SWING application window.
Arguments:
- inputfilename - pathname to an EDIFACT file. Required
Format
java com.americancoders.samples.SampleEDIFactDocumentHandlerAndViewer /incomingdiretory/filename
Notes
Application will throw a NullPointerException if no argument is specified
SampleX12DocumentHandler
Purpose:
Another converter, but the program's real purpose is to show you how to write an OBOE document handler.
The output is written to System.out and is in the OBOE well-formed XML format.
Arguments:
- inputfilename - pathname to an X12 file. Required
Format
java com.americancoders.samples.SampleX12DocumentHandler /incomingdiretory/filename
Notes
Application will throw a NullPointerException if no argument is specified
SampleX12DocumentHandlerAndViewer
Purpose:
Another converter, but the program's real purpose is to show you how to write an OBOE document handler.
The output is written to a SWING application window.
Arguments:
- inputfilename - pathname to an X12 file. Required
Format
java com.americancoders.samples.SampleX12DocumentHandlerAndViewer /incomingdiretory/filename
Notes
Application will throw a NullPointerException if no argument is specified
viewsample
Purpose:
Sample applet converts an incoming message to plain text. This is the first sample program written and
is kept around for posterity.
Arguments:
- Required
Format
This is an applet.
Notes
There is no main method.
viewsamples
Purpose:
Works in conjunction with viewsample. The application displays its results in Java AWT window.
Arguments:
- inputfilename - pathname to an X12 file. Required
- conversiontype - one character. Not Required
- e - X12
- x - well-formed XML
- v - validatable XML
- u - EDIFACT
if not specified then X12 is the output format.
Format
This is an applet.
Notes
Only works with X12 messages.
Converting from X12 to EDIFACT or vice versa is not logical.