X hits on this document

338 views

0 shares

0 downloads

0 comments

104 / 120

50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61:

WHEN 'SI-OPERAND-1' MOVE FUNCTION NUMVAL(XML-TEXT) TO SI-OPERAND-1 WHEN 'SI-OPERAND-2' MOVE FUNCTION NUMVAL(XML-TEXT) TO SI-OPERAND-2 WHEN 'SI-OPERATION' MOVE XML-TEXT TO SI-OPERATION END-EVALUATE WHEN 'END-OF-ELEMENT' INITIALIZE CURR-ELE-NAME END-EVALUATE . END PROGRAM 'XML2CALC'.

10) Update JSimpleCalculator.java to use the XJC-generated marshalling code to

send/receive XML through the JNI method defined in Step 8 and display the results

of the computations performed downstream by SMPLCALC.cbl.

To begin using the JNI XML bridge, create or uncomment a line in your code that

corresponds to the bolded line in Table 9.5. Essentially, code a call to method

Java2CblXmlBridge.smplCalcXmlInterface(inputXmlDoc), passing the JAXB generated

XML document, to invoke the legacy COBOL application SMPLCALC.cbl through JNI

and the XML layers. Table 9.9 lists the results of running the complete solution code for

the exercise with debug tracing turned on.

Table 9.9. Example run of the solution code with debug statements turned on.

01: ****************************************************

of a COBOL program from Java by

**

establishing an XML bridge leveraging **

JAXB, JNI, and COBOL XML support.

**

Teodoro Cipresso tcipress@hotmail.com

** **

10: 11: Select a task from the following menu: 12:

09: ****************************************************

02: ** Program: Java Front-end to COBOL Calculator 03: ** Purpose: Demonstrate reengineering and reuse

04: ** 05: ** 06: **

07: ** Author: 08: **

** **

96

Document info
Document views338
Page views339
Page last viewedTue Dec 06 09:47:28 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments