An Overview of the Sample Programs in the OBOE Package


Copyright 2006-2009 - 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:

  1. 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:

  1. EDI data file name - pathname to an incoming EDIFACT message Required
  2. XML output file name - pathname for the resulting XML Required

Format

java com.americancoders.samples.EdifactExample /incomingdirectory/filename /xmlDirectory/output.xml

Notes


FileConverter

Purpose:

This program attempts to read in EDI messages and converts them to one of several different formats.

Arguments:

  1. inputtype - (single character). Required
  2. inputfilename - pathname to an existing file in format as specified above. Required
  3. outputtype - (single character) . Required
  4. 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:

  1. 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:

  1. 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:

  1. 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:

  1. 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:

  1. 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:

  1. 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:

  1. inputfilename - pathname to an X12 file. Required
  2. conversiontype - one character. Not Required 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.