main to test in application mode
args[0] String - an input file name - contains an X12 message
args[1] String - optional integer value for output format
XML_FORMAT = 1;
X12_FORMAT = 2;
EDIFACT_FORMAT = 3 not logical
VALID_XML_FORMAT = 4;
CSV_FORMAT = 5;
FIXED_LENGTH_FORMAT = 6;
TRADACOMS_FORMAT = 7 not logical
VALID_XML_FORMAT_WITH_POSITION = 8;
ACH_FORMAT = 9 not logical
ACH_FORMAT_FOR_CBR_PBR = 10 not logical
PIXES_FORMAT = 11
file must contain an x12 edi document
main logic for testing
format: java com.americancoders.edi.IncomingEDIMail hostid userid password mailServerProtocol
where hostid is the name of your incoming mail server
userid mailid to get mail
password
mailServerProtocol - imap | pop3
output sent to log4j log file
program to parse incoming file main uses three required arguments and one optional
1) inputtype (single character) is x-X12, e-EDIFACT, w-well formed OBOE XML, v-validatable OBOE XML
2) inputfilename is an existing file in format as specified above
3) outputtype (single character) x-X12, e-EDIFACT, w-well formed OBOE XML, v-validatable OBOE XML, r-formatted report
4) outputfilename (optional) where output is to be written, if not specified file written to System.out
from command line
java com.americancoders.samples.SampleEDIFactDocumentHandler xxxx,
where xxxx is a EDIFact document filename
output sent to System.out
error message also sent to System.out
from command line
java com.americancoders.samples.SampleX12DocumentHandler xxxx,
where xxxx is a X12 document filename
output sent to System.out
error message also sent to System.out
from command line
java com.americancoders.samples.SampleX12DocumentHandlerAndViewer xxxx, where xxxx is a X12 document filename
error messages displayed in swing message window
program displays incoming document (using formatted report request)
as
tab 1 - opening envelope segments...
ABCDEFGHIKLMNOPRSTUVWX_ OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries. Copyright 1999-2004 American Coders, Ltd. POB 97462 Raleigh NC 27624 USA All Rights Reserved.