Updated 7/20/2021 to produce an XML file containing a CMS-1500 (February 2012).  Note that the
XML will contain only a CMS-1500.  If other document types are desired, uncomment the 'for' loop
near the top of the file XFSCreateXMLFile.java.

Updated 9/9/2015 to produce an XML file which includes the updated C-4NARR (October 2015),
the updated C-4AMR (October 2015), and the new OT/PT-4 (October 2015).

New York State Workers' Compensation Board -- XML Forms Submission Project -- Sample Java Code
==============================================================================================
This is a sample application which demonstrates how to use Java to create an XML file for the
NYS WCB XML Forms Submission Project.

The current schema has been run through the Java Architecture for XML Binding (JAXB) compiler
to create Java classes to hold the XML document data.

The sample application Java class, XFSCreateXMLFile (in file XFSCreateXMLFile.java), populates
those generated classes and then invokes a component of JAXB to generate an XML file from
them.

Note that there is no data base access in this sample application -- that is beyond its scope.
Static values are used to create one of each supported document type with attachments.

Supported Document Types
------------------------
C-4NARR (December 2008) (to be removed in the near future)
C-4NARR (December 2010) (to be removed in the near future)
C-4NARR (October 2015)
C-4AMR (August 2009) (to be removed in the near future)
C-4AMR (December 2010) (to be removed in the near future)
C-4AMR (October 2015)
CMS-1500 (February 2012)
OT/PT-4 (December 2010) (to be removed in the near future)
OT/PT-4 (October 2015)

A review of the comments in the source file XFSCreateFile.java is highly recommended.


Software Prerequisites
======================
Java J2SE 1.7.x or later JRE (available for free from http://www.oracle.com)


Installation
============
1.  Install the required software listed above, as necessary.
2.  Unzip the archive containing the sample application into a new directory.


Running the application
=======================
1.  Open a command prompt and change the the directory where you installed the sample application.
2.  Type RUNME and press Enter.  This will print the sample XML output on the screen.
3.  To create an XML file, type RUNME followed by a filename (Ex:  "RUNME out.xml").


Notes
=====
Previous versions of this sample code required a separate download of the JAXB supporting libraries.  These
libraries are now included within the sample archive.  The lib-jaxb-2.1.12 directory contains the JAXB runtime
jar files for version 2.1.12 of JAXB which was obtained from https://jaxb.java.net.  If you choose to use
this sample code as a basis for production applications, it is advised that the https://jaxb.java.net web
site be checked frequently for updates to these runtime libraries.


Contact
=======
If you have any questions about this sample application or any other technical issues, please
send an e-mail to xml-support@wcb.ny.gov


Disclaimer
==========
It is intended this code will work for you, however, there are no guarantees.  You may use this
code at your own risk.  The Board accepts no liabilities related to the use of this code.
