Execute JDEdwards Business Function via Invoker JAVA Program .xml
JDE Scenario:
We need to use EBI to read a file, via FileSystem Monitor, and then move the data file to the JDE PY/PD machine.
In this post we will explore the set-up the Invoker process. In the next post we will review the EXTOL EBI set-up, of calling the Invoker JAVA process.
JDE Invoker Steps:
- Calls JDE Invoker JAVA Class
- Reads the XML file
- Connects to JDE
- Process imported file
Files involved with JDE Invoker:
- Invoker.XML: File contains JDE environment information. ie. username/password; Filename being passed to JDE
- Build_run.sh: JAVA Class variables set in here; Invoker class called
- Output.XML: JDE output; result of execution
Invoker.XML - Set-up of JDE Invoker JAVA program
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jdeRequest comment="" environment="DV900" user="shoppe" pwd="shoppe" role="*ALL" session="" sessionidle="" type="callmethod">
<callMethod app="" name="ExampleShell">
<returnCode code="0"/>
<params>
<param name="cSuppressErrorMessage"/>
<param name="cErrorCode"/>
<param name="szErrorMessageID"/>
<param name="szErrorDescription"/>
<param name="szFileName">\u01\test\x123456.txt</param>
</params>
11
</callMethod>
</jdeRequest>
build_run.sh - Set-up of Java classes and execute JDE Invoker
#!/bin/bash
CLASSPATH=/u01/ebicustom/Invoker:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/xmlparserv2.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/xerces.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/System_JAR.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/ManagementAgent_JAR.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/jmxri.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/jmxremote_optional.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/JdeNet_JAR.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/commons-logging.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/commons-httpclient-3.0.jar:
CLASSPATH=${CLASSPATH}:/u01/ebicustom/Invoker/Classes/Base_JAR.jar:
cd /u01/ebicustom/Invoker
JAVA_HOME=/u01/EBI26/jre/bin/java
$JAVA_HOME -cp $CLASSPATH Invoker $1 'HostNameofJDEEnv' 6015
sleep 15s
Output.xml - Result of JDE Invoker JAVA Class Execution
<?xml version='1.0' encoding='UTF-8' ?>
<jdeResponse pwd='shoppe' role='*ALL' type='callmethod' user='shoppe' comment='' session='31215.1343674294.1' environment='DV900' sessionidle=''>
<callMethod app='' name='ExampleShell'>
<returnCode code='3'/>
<params>
<param name='szFileName'>\u01\test\x123456.txt</param>
</params>
</callMethod>
</jdeResponse>
By: Sean Hoppe on