7 Replies Latest reply on Aug 2, 2012 2:56 PM by Bruno Condemi

    About XML interop

      I Know that for using XML Interop I have to produce an XML file like that :
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <jdeRequest comment="" environment="PY812" pwd="xxxx" role="*ALL" session="" sessionidle="" type="callmethod" user="BUFFETAUD">
           <callMethod app="" name="LaunchBatchApplication">
                <returnCode code="0"/>
                     <param name="szReport">R0006P</param>
                     <param name="szVersionJDE">XJDE0001</param>
                     <param name="cSynch">0</param>
                     <param name="cPrintPreview">0</param>
                     <param name="szDataSourceOverride"/>
                     <param name="mnServerJobNumber">0</param>
                     <param name="cReturn"/>
                     <param name="cJDELogging">0</param>
                     <param name="cTracing">0</param>
                     <param name="cUBELoggingLevel">1</param>
                     <param name="szJobQueue">QBATCH</param>

      We are under JDE 8.12 Tools and an AS400 V6R1.

      We are now using Oracle Data Ingrator 11G.
      I would like to know how and where to send using ODI this XML to make JDE execute my call?
        • 1. Re: About XML interop
          Bruno Condemi
          You need to send the file throug java api. JDE is shipped with jar lib for interoperability so create a java class, import the lib, build the xml request and call the api to send the xml.

          Best Regards

          Bruno COndemi
          1 person found this helpful
          • 2. Re: About XML interop
            i f I understand somewhere in my enterprise server I have a jar file which I have to import on my VM where is ODI.
            Do you have any exemple to show me?
            • 3. Re: About XML interop
              Bruno Condemi
              This is from Oracle.
              Please mark the answer as correct if you think it's right.

              JXMLTool (EnterpriseOne 8.98)

              The JXMLTool is a GUI tool developed by Global Support Services to submit XML requests to ERP enterprise servers. The tool can be used to verify the integrity of the ERP services (kernel configuration, BSFN processing, among others) when testing inbound integrations from XPI and/or other third party systems to ERP. This document contains instructions on how to install and configure the tool.

              Installation and Configuration:
              1) Verify that a supported Java Development Kit (JDK) is installed in the workstation to be used in the test (for example, verify that JDK 1.4.2 is installed).

              Note: It is recommended that the workstation also have an EnterpriseOne 8.12 full client package installed.

              2) Create a new directory in the workstation (for example, C:\JXMLTool).

              3) Copy the following files from the Deployment server to the directory created in step 2:

              e812\system\classes\ xmlparserv2.jar
              e812\system\classes\ jmxremote_optional.jar

              Note: If you have multiple-foundation implemented in the system, make sure the files you are copying match the service pack level installed in the enterprise server.

              4) Rename jdeinterop.ini.templ to jdeinterop.ini. Modify the jdeinterop.ini file copied in step 3 to reflect the correct enterprise server name:

              a) Ensure that parameters glossaryTextServer in [SERVER] section, serviceNameConnect in [JDENET] section, and enterpriseServer, port in [INTEROP] section specify the correct enterprise server name and JDENET port number).

              b) Configure the value of Repository under [INTEROP] section such that it points to the directory created in step 2 (for example, “Repository= C:\JXMLTool”).

              c) Ensure that parameter SecurityServer in [SECURITY] section specify the correct security server.

              d) Configure OCMEnabled to “false” in [OCM] section.

              e) Add the parameter netTrace to [JDENET] section and configure its value as “1” (for example, “netTrace=1”)

              5) Rename jdelog.properties.templ to jdelog.properties. Modify the jdelog.properties file to reflect the characteristics of the machine:

              a) Ensure that jdelog.handler.JDELOG.File points to directory created in step 2 (for example, jdelog.handler.JDELOG.File=C:/JXMLTool/jderoot.log).

              b) Ensure that jdelog.handler.JASLOG.File points to directory created in step 2 (for example, jdelog.handler.JASLOG.File=C:/JXMLTool/jas.log).

              c) Remove comment marks from parameters jdelog.Debug, jdelog.handler.jasdebug, jdelog.handler.jasdebug.File, and jdelog.handler.jasdebug.Level.

              c) Ensure that jdelog.handler.jasdebug.File points to directory created in step 2 (for example, jdelog.handler.jasdebug.File=C:/JXMLTool/jasdebug.log).

              6) Create a new text file using the text editor of your choice (for example, Notepad).

              7)Paste the following text to the new document:

              @echo off

              REM Edit this file to the locations for Java and EnterpriseOne

              REM JDK root directory
              set JAVA_HOME=C:\j2sdk1.4.2_12
              set PATH=C:\j2sdk1.4.2_12\bin

              REM EnterpriseOne Windows client install path
              set OneWorld_HOME=C:\e812

              REM This directory
              set EXAMPLES=C:\Interop\JXMLTool

              REM Set the CLASSPATH environment variable.
              REM The following are libraries that are needed for Connector samples:

              set CLASSPATH=Base_JAR.jar
              set CLASSPATH=%CLASSPATH%;C:\Interop\JXMLTool\
              set CLASSPATH=%CLASSPATH%;C:\Interop\JXMLTool\JXMLTool.class
              set CLASSPATH=%CLASSPATH%;JdeNet_JAR.jar
              set CLASSPATH=%CLASSPATH%;System_JAR.jar
              set CLASSPATH=%CLASSPATH%;log4j.jar
              set CLASSPATH=%CLASSPATH%;xerces.jar
              set CLASSPATH=%CLASSPATH%;xalan.jar
              set CLASSPATH=%CLASSPATH%;ManagementAgent_JAR.jar
              set CLASSPATH=%CLASSPATH%;jmxri.jar
              set CLASSPATH=%CLASSPATH%;commons-httpclient-3.0.jar
              set CLASSPATH=%CLASSPATH%;commons-logging.jar
              set CLASSPATH=%CLASSPATH%;xmlparserv2.jar
              set CLASSPATH=%CLASSPATH%;jmxremote_optional.jar

              set CLASSPATH=%CLASSPATH%;%OneWorld_HOME%\system\classes\

              a) Ensure that "set JAVA_HOME" command sets the variable with correct path to JDK directory (for example, "set JAVA_HOME=c:\jdk142").

              b) Configure value of OneWorld_HOME such that it points to the directory where OneWorld® is installed (for example, “set OneWorld_HOME=C:\e812”).

              c) Ensure that "set EXAMPLES" command sets the variable with the correct path to directory created in step 2 (for example, "set EXAMPLES=C:\JXMLTool").

              d) Configure value of JDEINTEROPINI such that it points to the jdeinterop.ini file you copied in step 3 (for example,
              “set JDEINTEROPINI=%EXAMPLES%\jdeinterop.ini”).

              e) Append the path of the bin directory of the JDK to the PATH variable. For example, add the following line:
              “set PATH=%JAVA_HOME%\bin”

              8) Save the file as setenv.bat in the directory created in step 2 (for example, C:\JXMLTool\setEnv.bat).

              9) Create a new text file using the text editor of your choice (for example, Notepad).

              10) Paste the following text to the new document:

              import java.awt.*;
              import java.awt.event.*;
              import java.io.*;
              import java.util.GregorianCalendar;
              import java.util.Date;
              import javax.swing.JOptionPane;
              import javax.swing.JFrame;
              import com.jdedwards.system.xml.XMLRequest;
              import com.jdedwards.system.net.JdeNetTimeoutException;
              import com.jdedwards.system.net.JdeNetConnectFailedException;

              // Application: JXMLTool
              // Description: Java tool that submits XML requests to OneWorld® enterprise Servers
              // Author: Luis A. Santillo

              public class JXMLTool extends JFrame implements ActionListener {         
              Panel xmlPanel;
              Label ServerNameLabel;
              Label PortNumberLabel;
              TextField PortNumberField;
              TextField ServerNameField;
              TextArea RequestArea;
              TextArea ReplyArea;
              Button submitButton;
              String directory;
              String owServerName;
              String ReplyString;
              int owPortNumber;
              MenuBar mb = new MenuBar();
              Menu fileMenu = new Menu("File");
              Menu helpMenu = new Menu("Help");
              MenuItem openMenuItem = new MenuItem("Open");
              MenuItem exitMenuItem = new MenuItem("Exit");
              MenuItem helpMenuItem = new MenuItem("About");

              public static void main(String args[]) {
              JXMLTool jxmltool = new JXMLTool();

              public void init () {
              xmlPanel = createXMLPanel();
              this.setSize(640, 480);
              this.getContentPane().add(xmlPanel, BorderLayout.CENTER);
              fileMenu.add(new MenuItem("-"));
              directory = System.getProperty("user.dir");

              private Panel createXMLPanel()
              GridBagLayout gridbag = new GridBagLayout();
              GridBagConstraints constraints = new GridBagConstraints();

              xmlPanel = new Panel();

              buildConstraints(constraints, 0, 0, 1, 1, 10, 5);
              constraints.fill = GridBagConstraints.NONE;
              ServerNameLabel = new Label("OneWorld® Server Name", Label.LEFT);
              gridbag.setConstraints(ServerNameLabel, constraints);

              buildConstraints(constraints, 1, 0, 1, 1, 40, 0);
              constraints.fill = GridBagConstraints.NONE;
              ServerNameField = new TextField("", 20);
              gridbag.setConstraints(ServerNameField, constraints);

              buildConstraints(constraints, 2, 0, 1, 1, 10, 0);
              constraints.fill = GridBagConstraints.NONE;
              PortNumberLabel = new Label("Port Number", Label.LEFT);
              gridbag.setConstraints(PortNumberLabel, constraints);

              buildConstraints(constraints, 3, 0, 1, 1, 40, 0);
              constraints.fill = GridBagConstraints.NONE;
              PortNumberField = new TextField("", 20);
              gridbag.setConstraints(PortNumberField, constraints);

              buildConstraints(constraints, 0, 1, 4, 1, 0, 40);
              constraints.fill = GridBagConstraints.BOTH;
              RequestArea = new TextArea("", 10, 80);
              gridbag.setConstraints(RequestArea, constraints);

              buildConstraints(constraints, 0, 2, 4, 1, 0, 5);
              constraints.fill = GridBagConstraints.NONE;
              submitButton = new Button("Submit");
              gridbag.setConstraints(submitButton, constraints);

              buildConstraints(constraints, 0, 3, 4, 1, 0, 40);
              constraints.fill = GridBagConstraints.BOTH;
              ReplyArea = new TextArea("", 10, 80);
              gridbag.setConstraints(ReplyArea, constraints);

              return xmlPanel;

              void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy) {
              gbc.gridx = gx;
              gbc.gridy = gy;
              gbc.gridwidth = gw;
              gbc.gridheight = gh;
              gbc.weightx = wx;
              gbc.weighty = wy;

              public void actionPerformed(ActionEvent e) {
              if (e.getSource() instanceof MenuItem) {
              String label = ((MenuItem)e.getSource()).getLabel();
              if (label.equals("File"));
              if (label.equals("Open")) {
              FileDialog f = new FileDialog(this, "Open File", FileDialog.LOAD);
              directory = f.getDirectory();
              setFile(directory, f.getFile());
              if (label.equals("Exit"))
              if (label.equals("About"));
              if (e.getSource() instanceof Button) {
              if (ServerNameField.getText().equals(""))
              ReplyArea.setText("Error: server name is either null or empty!\nPlease enter new server name.\n");
              else {
              if (PortNumberField.getText().equals(""))
              ReplyArea.setText("Error: port number is either null or empty!\nPlease enter new port number.\n");
              else {
              owServerName = ServerNameField.getText();
              try {
              owPortNumber = Integer.parseInt(PortNumberField.getText());
              ReplyString = submitXMLRequest(RequestArea.getText());
              ReplyArea.setText(ReplyArea.getText() + "\n\n" + ReplyString);
              catch (NumberFormatException nfex) {
              ReplyArea.setText("Error: unable to format port number!\n");
              ReplyArea.setText(ReplyArea.getText() + "Exception: " + nfex +"\nPlease enter new port number.\n");

              public void setFile(String directory, String filename) {
              if ((filename == null) || (filename.length() == 0)) return;
              File f;
              FileReader in = null;
              try {
              f = new File(directory, filename);
              in = new FileReader(f);
              int size = (int) f.length();
              char[] data = new char[size];
              int chars_read = 0;
              while(chars_read < size)
              chars_read += in.read(data, chars_read, size-chars_read);
              RequestArea.setText(new String(data));
              catch (IOException e) {
              ReplyArea.setText(e.getClass().getName() + ": " + e.getMessage());
              finally { try { if (in != null) in.close(); } catch (IOException e) {} }

              public String submitXMLRequest(String xmlIn) {
              GregorianCalendar gregCalendar = new GregorianCalendar();
              String xmlOut = null;
              Date currentDate;
              try {
              ReplyArea.setText(gregCalendar.getTime() + " New XML request.\n");
              ReplyArea.setText(ReplyArea.getText() + gregCalendar.getTime() + " Creating XML request using text in area above.\n");
              XMLRequest xml = new XMLRequest(owServerName, owPortNumber, xmlIn);
              ReplyArea.setText(ReplyArea.getText() + gregCalendar.getTime() + " XML request submitted to " + owServerName + " using port number " + PortNumberField.getText() + ".\n");
              ReplyArea.setText(ReplyArea.getText() + gregCalendar.getTime() + " Waiting for reply from " + owServerName + ".\n");
              xmlOut = xml.execute();
              catch (JdeNetTimeoutException toex) {
              ReplyArea.setText(ReplyArea.getText() + "\nError: JDENet timed out!\n" + "Exception: " + toex +"\n\n");
              catch (JdeNetConnectFailedException cfex) {
              ReplyArea.setText(ReplyArea.getText() + "\nError: JDENet connect failed!\n" + "Exception: " + cfex +"\n\n");
              catch (java.io.IOException ioex) {
              ReplyArea.setText(ReplyArea.getText() + "\nError: IO Exception!\n" + "Exception: " + ioex +"\n\n");
              currentDate = new Date ();
              ReplyArea.setText(ReplyArea.getText() + gregCalendar.getTime() + " Reply received from " + owServerName + ".\n");
              return xmlOut;

              public void processWindowEvent(WindowEvent e) {
              if (e.getID() == Event.WINDOW_DESTROY) {

              11) Save the file as JXMLTool.java in the directory created in step 2 (for example, C:\JXMLTool\JXMLTool.java).

              12) Create a new text file using the text editor of your choice (for example, Notepad).

              13) Paste the following text to the new document:

              @echo off
              call setenv.bat
              javac JXMLTool.java

              14) Save the file as build.bat in the directory created in step 2 (for example, C:\JXMLTool\build.bat).

              15) Build the JXMLTool Java application:

              a) Open a new MS-DOS Command Prompt window.

              b) Change the current directory to the directory created in step 2.

              c) Call the build.bat script to compile the Java code and create the JXMLTool Java class.

              d) Verify that JXMLTool.class exists in the directory created in step 2 (for example,

              16) Create a new text file using the text editor of your choice (for example, Notepad).

              17) Paste the following text to the new document:

              @echo off
              call setenv.bat
              java -Dconfig_file=jdeinterop.ini JXMLTool

              18) Save the file as run.bat in the directory created in step 2 (for example, C:\JXMLTool\run.bat).


              1) Open a new MS-DOS Command Prompt window.

              2) Change the current directory to the directory created in step 2.

              3) Call the run.bat script to execute the JXMLTool Java application.

              5) In the Java application, enter enterprise server name and port number in appropriate text fields.

              6) Enter the following text in the upper panel:

              <?xml version='1.0' ?>
              <jdeRequest type='callmethod' user='JDE' pwd='JDE' environment='JPD812' session=''>
              <callMethod name='GetEffectiveAddress' app='JXMLTool'>
              <param name='mnAddressNumber'>1001</param>

              7) Modify the XML information to reflect the characteristics of the system:

              a) Replace user, password, and environment with correct values for your system.

              b) If 1001 is not a valid AddressBook number, replace it with a valid AB number.

              8) Click the button “Submit”.

              9) Verify that an XML reply is received from enterprise server. The reply will be displayed in the lower panel.

              Retrieving an XML Template for BSFN Request:

              1) Repeat steps 1 through 9 in Usage, using the following text in step 6:

              <?xml version='1.0' ?>
              <jdeRequest type='callmethod' user='JDE' pwd='JDE' environment='JPD812'>
              <callMethodTemplate name='GetEffectiveAddress' app='JXMLTool'/>

              2) Highlight the text in the lower panel, starting with tag “<?xml version='1.0' ?>”.

              3) Press Control (Ctrl) and C keys simultaneously.

              4) Open a new text document using the text editor of your choice.

              5) Paste contents into new text document.

              6) Remove tag “<returnCode=’0’/>”.

              7) Save text document with extension .xml.
              • 4. Re: About XML interop
                So it is mandatory to have a fat client on my VM?
                • 5. Re: About XML interop
                  Bruno Condemi
                  No, there is no need.
                  • 6. Re: About XML interop
                    Thanks a lot I will try.
                    If I understand JXML is a java standalone app? Is there a way to avoid the panel, I want ODI to to the same as JXML but without prompt.
                    • 7. Re: About XML interop
                      Bruno Condemi
                      Of course,
                      use only :
                      XMLRequest xml = new XMLRequest(owServerName, owPortNumber, xmlIn);
                      xmlOut = xml.execute();

                      owServerName is the jde ent server
                      owPortNumber is the jde service port
                      xmlIn is your xml
                      xmlOut is the return (if you need it)