Skip to Content

This is the final part of this blog series
and I am combining all the remaining XI design objects to give a complete picture since most
of the remaining object creation looks similar (but not actually same). If you
are reading this first, you better read the following blogs first for better
understanding and clarity.

In all the other design objects like Interface Mapping,
Message Interface, Imported Archives, External Definition, etc the way they are
created remains similar to Software Component but definitely not same.

I had provided the java source code to access all the design objects. Using these classes, one can create / modify Integration Repository
objects.


Xi_InterfaceMapping.java


(Interface Mapping Class)


package xidb;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Vector;


/**

  • @author Felix Jeyareuben

*/


public class Xi_InterfaceMapping {


     XiDbUtils utils;


     Connection con;


     String ownerrepid;


     String relationid;


     String objectid;


     String versionid;


     String versionsetid;


     String versionsetid_2_dev;


     // String versionsetid_1_cons;


     Vector params = new Vector();


     String owner;


     String swcid;


     String namespace;


     String target_objid;


     public void printString() {
          System.out.println(“objectid:” + objectid);
          System.out.println(“relationid:” + relationid);
          System.out.println(“versionid:” + versionid);
          System.out.println(“versionsetid:” + versionsetid);
          System.out.println(“versionsetid_2_dev:” + versionsetid_2_dev);
     }


     public Xi_InterfaceMapping(String _owner, String _swcid, String _namespace,
               String parentversionsetid_2_dev) {
          versionsetid_2_dev = parentversionsetid_2_dev;
          namespace = _namespace;
          swcid = _swcid;
          owner = _owner;
          utils = new XiDbUtils();
          con = utils.getConnection();
          ownerrepid = XiDbUtils.generateID(32);
          relationid = XiDbUtils.generateID(32);
          objectid = XiDbUtils.generateID(32);
          versionid = XiDbUtils.generateID(32);
          versionsetid = XiDbUtils.generateID(32);
     }


     public void closeConnection() {
          try {
               con.close();
          } catch (SQLException e) {
               e.printStackTrace();
          }
     }


     public void xi_dircacheevent() {
          // System.out.println(“-> xi_dircacheevent”);
          String sql = XiDbUtils.getSqlQuery(“xi_dircacheevent”, 9);
          params.clear();
          params.add(“_INTEGRATION_SERVER_”);
          params.add(objectid);
          params.add(“RC”);
          params.add(“”);
          params.add(“Standard Change List”);
          params.add(XiDbUtils.getNow());
          params.add(“C”);
          params.add(“X”);
          params.add(XiDbUtils.getNow());
          utils.insertRecord(con, sql, params, new String[] { “VARCHAR2”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”,
                    “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_dircacherclview() {
          String table_name = “xi_dircacherclview”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“MAPPING”);
          params.add(objectid);
          params.add(swcid);
          params.add(“-1”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “RAW”, “RAW”, “NUMBER” });
     }


     public void xi_dirkeyname(String IM_Name) {
          String table_name = “xi_dirkeyname”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“MAPPING”);
          params.add(IM_Name);
          params.add(namespace);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_pchangelist() {
          String table_name = “xi_pchangelist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionsetid);
          params.add(“”);
          params.add(“4”);
          params.add(owner);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “VARCHAR2” });
     }


     public void xi_pverrelation() {
          String table_name = “xi_pverrelation”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 14);
          params.clear();


          params.add(relationid);
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(XiDbUtils.generateZeros(32));
          params.add(XiDbUtils.generateZeros(32));
          params.add(“0”);
          params.add(versionid);
          params.add(relationid);
          params.add(“1”);
          params.add(“1”);
          params.add(“2”);
          params.add(owner);
          params.add(XiDbUtils.getNow());


          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “RAW”, “RAW”, “RAW”, “NUMBER”, “RAW”, “RAW”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_pversion() {
          String table_name = “xi_pversion”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(relationid);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionedobj() {
          String table_name = “xi_pversionedobj”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“1”);
          params.add(“XI_Model_1.0”);
          params.add(“1”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionset(String swcname, String vendor) {
          String table_name = “xi_pversionset”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 20);
          params.clear();
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(“_D_Standard Change List”);
          params.add(“Standard change list for software component version “
                    + swcname + “, 1.0 of ” + vendor);
          params.add(“3”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “TIMESTAMP”, “TIMESTAMP”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “NUMBER” });
     }


     public void xi_pvsetelement() {
          String table_name = “xi_pvsetelement”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionsetid);
          params.add(objectid);
          params.add(versionid);
          params.add(“0”);
          params.add(“3”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });


          params.clear();
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(versionid);
          params.add(“2”);
          params.add(“1”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });
     }


     public void xi_pvsetelemhist() {
          String table_name = “xi_pvsetelemhist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 9);
          params.clear();
          params.add(versionsetid_2_dev);
          params.add(“1”);
          params.add(objectid);
          params.add(versionid);
          params.add(“1”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “RAW”, “RAW”, “NUMBER”, “NUMBER”, “TIMESTAMP”, “TIMESTAMP”,
                    “NUMBER” });
     }


     public void xi_pvsintegration(String order) {
          String table_name = “xi_pvsintegration”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 6);
          params.clear();
          params.add(order);
          params.add(versionsetid_2_dev);
          params.add(versionsetid);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “NUMBER”, “RAW”,
                    “RAW”, “VARCHAR2”, “TIMESTAMP”, “NUMBER” });
     }


     public void xi_repcacheevent() {
          String table_name = “xi_repcacheevent”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionsetid);
          params.add(“RC”);
          params.add(XiDbUtils.generateZeros(32));
          params.add(owner);
          params.add(“Standard Change List”);
          params.add(“X”);
          params.add(XiDbUtils.getNow());
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “RAW”, “VARCHAR2”, “VARCHAR2”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_repchangelist() {
          String table_name = “xi_repchangelist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 3);
          params.clear();
          params.add(versionsetid);
          params.add(swcid);
          params.add(XiDbUtils.generateZeros(32));
          utils.insertRecord(con, sql, params,
                    new String[] { “RAW”, “RAW”, “RAW” });
     }


     public void xi_repdataadmin() {
          String table_name = “xi_repdataadmin”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(“MAPPING”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(owner);
          params.add(versionid);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”, “RAW” });
     }


     public void xi_repdatalink(String extdef_in_objid, String extdef_out_objid,
               String mi_in_objid, String mi_out_objid, String ia_class_objid) {
          String table_name = “xi_repdatalink”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 11);
          // extdef_in_objid
          params.clear();
          params.add(versionid);
          params.add(“REQUEST_IN_MES”);
          params.add(“0”);
          params.add(extdef_out_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“MAPPING”);
          params.add(“ifmextmes”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”, “NUMBER”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          // extdef_out_objid
          params.clear();
          params.add(versionid);
          params.add(“REQUEST_OUT_MES”);
          params.add(“0”);
          params.add(extdef_in_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“MAPPING”);
          params.add(“ifmextmes”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”, “NUMBER”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          // mi_in_objid
          params.clear();
          params.add(versionid);
          params.add(“OUTBOUND_IF”);
          params.add(“1”);
          params.add(mi_in_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“MAPPING”);
          params.add(“ifmmessif”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”, “NUMBER”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          // mi_out_objid
          params.clear();
          params.add(versionid);
          params.add(“INBOUND_IF”);
          params.add(“1”);
          params.add(mi_out_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“MAPPING”);
          params.add(“ifmmessif”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”, “NUMBER”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          // ia_class_objid
          params.clear();
          params.add(versionid);
          params.add(“REQUEST_TRAFO”);
          params.add(“0”);
          params.add(ia_class_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“MAPPING”);
          params.add(“MAP_ARCHIVE_PRG”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”, “NUMBER”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });


     }
     
     public void xi_repdatamapatt() throws Exception {
          String table_name = “xi_repdatamapatt”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(“1:1”);
          FileInputStream fis=new FileInputStream(“xi_repdatamapatt.io”);
          ByteArrayOutputStream bos=new ByteArrayOutputStream();
          int c=0;
          while((c=fis.read())!=-1)
               bos.write(c);
          fis.close();          
          params.add(bos.toByteArray());
          bos.close();
          params.add(“IO”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “BLOB”, “VARCHAR2” });
     }
     
     public void xi_repkeyname(String name) {
          String table_name = “xi_repkeyname”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“MAPPING”);
          params.add(name);
          params.add(namespace);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_reptexthead() {
          String table_name = “xi_reptexthead”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(“0”);
          params.add(“EN”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER” });
     }


     public void xi_reptextshort() {
          String table_name = “xi_reptextshort”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 2);
          params.clear();
          params.add(versionid);
          params.add(” “);
          utils
                    .insertRecord(con, sql, params, new String[] { “RAW”,
                              “VARCHAR2” });
     }


     public void xi_reptextshort_tx() {
          String table_name = “xi_reptextshort_tx”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(” “);
          params.add(“EN”);
          params.add(” “);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public String doCreate(String seqno,String IM_name, String swc_name, String vendor,
               String extdef_in_objid, String extdef_out_objid,
               String mi_in_objid, String mi_out_objid, String ia_class_objid          
     ) {
          xi_dircacheevent();
          xi_dircacherclview();
          xi_dirkeyname(IM_name);
          xi_pchangelist();
          xi_pverrelation();
          xi_pversion();
          xi_pversionedobj();
          xi_pversionset(swc_name, vendor);
          xi_pvsetelement();
          xi_pvsetelemhist();
          xi_pvsintegration(seqno);
          xi_repcacheevent();
          xi_repchangelist();
          xi_repdataadmin();
          xi_repdatalink(extdef_in_objid, extdef_out_objid,
                    mi_in_objid, mi_out_objid, ia_class_objid);
          try {
               xi_repdatamapatt();
          } catch (Exception e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          }
          xi_repkeyname(IM_name);
          xi_reptexthead();
          xi_reptextshort();
          xi_reptextshort_tx();          
          return versionid;
     }
}


</textarea>


xi_repdatamapatt.io


(Used in Interface Mapping Class)


Xi_MsgInterface.java


(Message Interface Class)


package xidb;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Vector;


/**

  • @author Felix Jeyareuben

*/


public class Xi_MsgInterface {


     XiDbUtils utils;


     Connection con;


     String ownerrepid;


     String relationid;


     String objectid;


     String versionid;


     String versionsetid;


     String versionsetid_2_dev;


     //String versionsetid_1_cons;


     Vector params = new Vector();


     String owner;


     String swcid;
     
     String namespace;
     
     String role_id;
     
     String sync_target_objid;
     
     Xi_ExternalDefn ext;
     
     public void printString() {          
             System.out.println(“objectid:”+objectid);
             System.out.println(“relationid:”+relationid);
             System.out.println(“versionid:”+versionid);
             System.out.println(“versionsetid:”+versionsetid);
             System.out.println(“versionsetid_2_dev:”+versionsetid_2_dev);       
          }
     
     public Xi_MsgInterface(String _owner,String _swcid,String _namespace,String parentversionsetid_2_dev) {
          versionsetid_2_dev=_parent_versionsetid_2_dev;
          namespace=_namespace;
          swcid=_swcid;          
          owner = _owner;
          utils = new XiDbUtils();
          con = utils.getConnection();
          ownerrepid = XiDbUtils.generateID(32);
          relationid = XiDbUtils.generateID(32);
          objectid = XiDbUtils.generateID(32);
          versionid = XiDbUtils.generateID(32);
          versionsetid = XiDbUtils.generateID(32);
     }


     public void closeConnection()
     {
          try {
               con.close();
          } catch (SQLException e) {
               e.printStackTrace();
          }
     }
     
     public void xi_pchangelist() {
          String table_name = “xi_pchangelist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionsetid);
          params.add(“”);
          params.add(“4”);
          params.add(owner);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “VARCHAR2” });
     }


     public void xi_pverrelation() {
          String table_name = “xi_pverrelation”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 14);
          params.clear();


          params.add(relationid);
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(XiDbUtils.generateZeros(32));
          params.add(XiDbUtils.generateZeros(32));
          params.add(“0”);
          params.add(versionid);
          params.add(relationid);
          params.add(“1”);
          params.add(“1”);
          params.add(“2”);
          params.add(owner);
          params.add(XiDbUtils.getNow());


          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “RAW”, “RAW”, “RAW”, “NUMBER”, “RAW”, “RAW”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_pversion() {
          String table_name = “xi_pversion”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(relationid);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionedobj() {
          String table_name = “xi_pversionedobj”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“1”);
          params.add(“XI_Model_1.0”);
          params.add(“1”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionset(String swcname,String vendor) {
          String table_name = “xi_pversionset”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 20);
          params.clear();
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(“_D_Standard Change List”);
          params.add(“Standard change list for software component version “swcname“, 1.0 of “+vendor);
          params.add(“3”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “TIMESTAMP”, “TIMESTAMP”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “NUMBER” });
     }


     public void xi_pvsetelement() {
          String table_name = “xi_pvsetelement”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionsetid);
          params.add(objectid);
          params.add(versionid);
          params.add(“0”);
          params.add(“3”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });


          params.clear();
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(versionid);
          params.add(“2”);
          params.add(“1”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });
     }


     public void xi_pvsetelemhist() {
          String table_name = “xi_pvsetelemhist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 9);
          params.clear();
          params.add(versionsetid_2_dev);
          params.add(“1”);
          params.add(objectid);
          params.add(versionid);
          params.add(“1”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “RAW”, “RAW”, “NUMBER”, “NUMBER”, “TIMESTAMP”, “TIMESTAMP”,
                    “NUMBER” });
     }


     public void xi_pvsintegration(String order) {
          String table_name = “xi_pvsintegration”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 6);
          params.clear();
          params.add(order);
          params.add(versionsetid_2_dev);
          params.add(versionsetid);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “NUMBER”, “RAW”,
                    “RAW”, “VARCHAR2”, “TIMESTAMP”, “NUMBER” });
     }


     public void xi_repchangelist() {
          String table_name = “xi_repchangelist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 3);
          params.clear();
          params.add(versionsetid);
          params.add(swcid);
          params.add(XiDbUtils.generateZeros(32));
          utils.insertRecord(con, sql, params,
                    new String[] { “RAW”, “RAW”, “RAW” });
     }


     public void xi_repdataadmin() {
          String table_name = “xi_repdataadmin”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(“ifmmessif”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(owner);
          params.add(versionid);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”, “RAW” });
     }
     
     //@todo
     
     public void xi_repdataifr_mif(boolean is_synchronous,boolean is_outbound) {
          String table_name = “xi_repdataifr_mif”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 3);
          params.clear();
          params.add(versionid);
          if(is_synchronous)
               params.add(“X”);
          else
               params.add(” “);
          if(is_outbound)
               {
               params.add(“O”);
               role_id=”OUTPUT”;
               }
          else
               {
               params.add(“I”);
               role_id=”INPUT”;
               }
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2” });
     }


          
     public void xi_repkeyname(String name) {
          String table_name = “xi_repkeyname”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“ifmmessif”);
          params.add(name);
          params.add(namespace);          
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                     “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_reptexthead() {
          String table_name = “xi_reptexthead”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(“0”);
          params.add(“EN”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER” });
     }


     public void xi_reptextshort() {
          String table_name = “xi_reptextshort”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 2);
          params.clear();
          params.add(versionid);
          params.add(” “);
          utils
                    .insertRecord(con, sql, params, new String[] { “RAW”,
                              “VARCHAR2” });
     }


     public void xi_reptextshort_tx() {
          String table_name = “xi_reptextshort_tx”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(” “);
          params.add(“EN”);
          params.add(” “);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }
     
     public void xi_repdatalink(String tgt_objid,String seqid,String roleid) {
          String table_name = “xi_repdatalink”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 11);
          params.clear();
          params.add(versionid);
          params.add(_role_id);
          params.add(seqid);
          params.add(tgt_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“ifmmessif”);
          params.add(“ifmextmes”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”,
                    “VARCHAR2″,”NUMBER”,”RAW”,
                    “VARCHAR2”, “VARCHAR2”,
                    “RAW”,”NUMBER”,”VARCHAR2″,”VARCHAR2″,”VARCHAR2″});
     }
     
     public String doCreate(String seqno,boolean isSync,boolean isOutbound,String MI_Name,String swc_name,String vendor,String target_objid)
     {
          xi_pchangelist();
          xi_pverrelation();
          xi_pversion();
          xi_pversionedobj();     
          xi_pversionset(swc_name,vendor);
          xi_pvsetelement();
          xi_pvsetelemhist();
          xi_pvsintegration(seqno);
          xi_repchangelist();
          xi_repdataadmin();
          xi_repdataifr_mif(isSync,isOutbound);
          if(!isSync)
               xi_repdatalink(target_objid,”0″,role_id);
          else
          {
               xi_repdatalink(sync_target_objid,”0″,”INPUT”);
               xi_repdatalink(target_objid,”0″,”OUTPUT”);
               xi_repdatalink(target_objid,”1″,”OUTPUT”);
          }
          
          xi_repkeyname(MI_Name);
          xi_reptexthead();
          xi_reptextshort();
          xi_reptextshort_tx();          
          return versionid;
     }
}


</textarea>


Xi_ImportedArchives.java


(Imported Archive Class)


package xidb;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;


/**

  • @author Felix Jeyareuben

*/


public class Xi_ImportedArchives {


     XiDbUtils utils;


     Connection con;


     String ownerrepid;


     String relationid;


     String objectid;


     String versionid;


     String versionsetid;


     String versionsetid_2_dev;


     // String versionsetid_1_cons;


     Vector params = new Vector();


     String owner;


     String swcid;


     String namespace;


     String role_id;


     Hashtable jar_entries=new Hashtable();
     
     public void printString() {
          System.out.println(“objectid:” + objectid);
          System.out.println(“relationid:” + relationid);
          System.out.println(“versionid:” + versionid);
          System.out.println(“versionsetid:” + versionsetid);
          System.out.println(“versionsetid_2_dev:” + versionsetid_2_dev);
     }


     public Xi_ImportedArchives(String _owner, String _swcid, String _namespace,
               String parentversionsetid_2_dev) {
          versionsetid_2_dev = parentversionsetid_2_dev;
          namespace = _namespace;
          swcid = _swcid;
          owner = _owner;
          utils = new XiDbUtils();
          con = utils.getConnection();
          ownerrepid = XiDbUtils.generateID(32);
          relationid = XiDbUtils.generateID(32);
          objectid = XiDbUtils.generateID(32);
          versionid = XiDbUtils.generateID(32);
          versionsetid = XiDbUtils.generateID(32);
     }


     public void closeConnection() {
          try {
               con.close();
          } catch (SQLException e) {
               e.printStackTrace();
          }
     }


     public void xi_pchangelist() {
          String table_name = “xi_pchangelist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionsetid);
          params.add(“”);
          params.add(“4”);
          params.add(owner);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “VARCHAR2” });
     }


     public void xi_pverrelation() {
          String table_name = “xi_pverrelation”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 14);
          params.clear();


          params.add(relationid);
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(XiDbUtils.generateZeros(32));
          params.add(XiDbUtils.generateZeros(32));
          params.add(“0”);
          params.add(versionid);
          params.add(relationid);
          params.add(“1”);
          params.add(“1”);
          params.add(“2”);
          params.add(owner);
          params.add(XiDbUtils.getNow());


          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “RAW”, “RAW”, “RAW”, “NUMBER”, “RAW”, “RAW”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_pversion() {
          String table_name = “xi_pversion”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(relationid);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionedobj() {
          String table_name = “xi_pversionedobj”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“1”);
          params.add(“XI_Model_1.0”);
          params.add(“1”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionset(String swcname, String vendor) {
          String table_name = “xi_pversionset”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 20);
          params.clear();
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(“_D_Standard Change List”);
          params.add(“Standard change list for software component version “
                    + swcname + “, 1.0 of ” + vendor);
          params.add(“3”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “TIMESTAMP”, “TIMESTAMP”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “NUMBER” });
     }


     public void xi_pvsetelement() {
          String table_name = “xi_pvsetelement”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionsetid);
          params.add(objectid);
          params.add(versionid);
          params.add(“0”);
          params.add(“3”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });


          params.clear();
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(versionid);
          params.add(“2”);
          params.add(“1”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });
     }


     public void xi_pvsetelemhist() {
          String table_name = “xi_pvsetelemhist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 9);
          params.clear();
          params.add(versionsetid_2_dev);
          params.add(“1”);
          params.add(objectid);
          params.add(versionid);
          params.add(“1”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “RAW”, “RAW”, “NUMBER”, “NUMBER”, “TIMESTAMP”, “TIMESTAMP”,
                    “NUMBER” });
     }


     public void xi_pvsintegration(String order) {
          String table_name = “xi_pvsintegration”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 6);
          params.clear();
          params.add(order);
          params.add(versionsetid_2_dev);
          params.add(versionsetid);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “NUMBER”, “RAW”,
                    “RAW”, “VARCHAR2”, “TIMESTAMP”, “NUMBER” });
     }


     public void xi_repchangelist() {
          String table_name = “xi_repchangelist”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 3);
          params.clear();
          params.add(versionsetid);
          params.add(swcid);
          params.add(XiDbUtils.generateZeros(32));
          utils.insertRecord(con, sql, params,
                    new String[] { “RAW”, “RAW”, “RAW” });
     }


     public void xi_repdataadmin() {
          String table_name = “xi_repdataadmin”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(“TRAFO_JAR”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(owner);
          params.add(versionid);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”, “RAW” });
     }


     public void xi_repkeyname(String name) {
          String table_name = “xi_repkeyname”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“TRAFO_JAR”);
          params.add(name);
          params.add(namespace);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_reptexthead() {
          String table_name = “xi_reptexthead”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(“0”);
          params.add(“EN”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER” });
     }


     public void xi_reptextshort() {
          String table_name = “xi_reptextshort”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 2);
          params.clear();
          params.add(versionid);
          params.add(” “);
          utils
                    .insertRecord(con, sql, params, new String[] { “RAW”,
                              “VARCHAR2” });
     }


     public void xi_reptextshort_tx() {
          String table_name = “xi_reptextshort_tx”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(” “);
          params.add(“EN”);
          params.add(” “);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_repdatalink(Vector tgt_ids, String roleid) {
          String table_name = “xi_repdatalink”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 11);
          for (int i = 0; i < tgt_ids.size(); i++) {
               params.clear();
               params.add(versionid);
               params.add(_role_id); // _inner
               params.add(Integer.toString(i));
               params.add(tgt_ids.get(i));
               params.add(“R”);
               params.add(“S”);
               params.add(swcid);
               params.add(“-1”);
               params.add(” “);
               params.add(“TRAFO_JAR”);
               params.add(“MAP_ARCHIVE_PRG”);
               utils.insertRecord(con, sql, params, new String[] { “RAW”,
                         “VARCHAR2”, “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “RAW”,
                         “NUMBER”, “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          }
     }


     //


     public void xi_dircacheevent() {
          // System.out.println(“-> xi_dircacheevent”);
          String sql = XiDbUtils.getSqlQuery(“xi_dircacheevent”, 9);
          params.clear();
          params.add(“_INTEGRATION_SERVER_”);
          params.add(objectid);
          params.add(“RC”);
          params.add(“”);
          params.add(“Standard Change List”);
          params.add(XiDbUtils.getNow());
          params.add(“C”);
          params.add(“X”);
          params.add(XiDbUtils.getNow());
          utils.insertRecord(con, sql, params, new String[] { “VARCHAR2”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”,
                    “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_dircacherclview() {
          String table_name = “xi_dircacherclview”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“TRAFO_JAR”);
          params.add(objectid);
          params.add(swcid);
          params.add(“-1”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “RAW”, “RAW”, “NUMBER” });
     }


     public void xi_dirkeyname(String IA_JarName) {
          String table_name = “xi_dirkeyname”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“TRAFO_JAR”);
          params.add(IA_JarName);
          params.add(namespace);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_repcacheevent() {
          String table_name = “xi_repcacheevent”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionsetid);
          params.add(“RC”);
          params.add(XiDbUtils.generateZeros(32));
          params.add(owner);
          params.add(“Standard Change List”);
          params.add(“X”);
          params.add(XiDbUtils.getNow());
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “RAW”, “VARCHAR2”, “VARCHAR2”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_repdatablobs(String jarfile) throws Exception{
          String table_name = “xi_repdatablobs”;
          // System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(versionid);
          params.add(“JAR”);
          params.add(“jar”);
          params.add(“Cp1252”);
          FileInputStream fis=new FileInputStream(jarfile);
          ByteArrayOutputStream bos=new ByteArrayOutputStream();
          int c=0;
          while((c=fis.read())!=-1)
               bos.write(c);                    
          fis.close();          
          params.add(bos.toByteArray());
          bos.close();
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2”, “BLOB” });
     }


     public Vector xi_repkeyarchvsub(String IA_Name, String jarfile)
               throws Exception {
          String table_name = “xi_repkeyarchvsub”;          
          File f = new File(jarfile);
          JarFile jfile = new JarFile(f);
          Enumeration enu = jfile.entries();
          
          Vector tgt_ids = new Vector();
          jar_entries.clear();
          while (enu.hasMoreElements()) {
               JarEntry je = (JarEntry) enu.nextElement();
               String filename = je.getName();
               // System.out.println(“-> ” + table_name);
               String sql = XiDbUtils.getSqlQuery(table_name, 6);
               params.clear();
               String tgt_id = XiDbUtils.generateID(32);
               jar_entries.put(filename,tgt_id);
               tgt_ids.add(tgt_id);
               params.add(tgt_id);
               params.add(“MAP_ARCHIVE_PRG”);
               params.add(IA_Name);
               params.add(namespace);
               params.add(filename.substring(filename.indexOf(“.”) + 1)); // ext
                                                                                          // (type
               params.add(filename.substring(0, filename.indexOf(“.”))); //
               utils.insertRecord(con, sql, params,
                         new String[] { “RAW”, “VARCHAR2”, “VARCHAR2”, “VARCHAR2”,
                                   “VARCHAR2”, “VARCHAR2” });
          }
          return tgt_ids;
     }


     public void xi_runmappings(String IA_Name, String jarfile)
               throws Exception {
          String table_name = “xi_runmappings”;
          File f = new File(jarfile);
          JarFile jfile = new JarFile(f);
          Enumeration enu = jfile.entries();
          while (enu.hasMoreElements()) {
               JarEntry je = (JarEntry) enu.nextElement();
               String filename = je.getName();               
               // System.out.println(“-> ” + table_name);
               String sql = XiDbUtils.getSqlQuery(table_name, 11);
               params.clear();
               params.add(namespace);
               params.add(swcid);
               params.add(“-1”);
               params.add(XiDbUtils.generateID(32));//NOT KNOWN (isGenerated?)
               params.add(filename);
               params.add(filename.substring(filename.indexOf(“.”) + 1));
               params.add(Long.toString(je.getSize()));
               params.add(IA_Name);
               params.add(“A”);
               params.add(XiDbUtils.getNow());
               InputStream is=jfile.getInputStream(je);
               ByteArrayOutputStream bos=new ByteArrayOutputStream();
               int c=0;
               while((c=is.read())!=-1)
                    bos.write(c);
               is.close();
               params.add(bos.toByteArray());//content
               bos.close();               
               utils.insertRecord(con, sql, params, new String[] { “VARCHAR2”,
                         “RAW”, “NUMBER”, “RAW”, “VARCHAR2”, “VARCHAR2”, “NUMBER”,
                         “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “BLOB” });
          }
     }


     public String doCreate(String seqno, String IA_Name, String swc_name,
               String vendor, String jarfile) {
          // ToDo : 7 tables to update, ref: Imported Archive doc
          xi_pchangelist();
          xi_pverrelation();
          xi_pversion();
          xi_pversionedobj();
          xi_pversionset(swc_name, vendor);
          xi_pvsetelement();
          xi_pvsetelemhist();
          xi_pvsintegration(seqno);
          xi_repchangelist();
          xi_repdataadmin();
          Vector tgt_ids = null;
          try {
               tgt_ids = xi_repkeyarchvsub(IA_Name, jarfile);
          } catch (Exception e) {
               e.printStackTrace();
          }
          xi_repdatalink(tgt_ids, “_inner”);
          xi_repkeyname(IA_Name);
          xi_reptexthead();
          xi_reptextshort();
          xi_reptextshort_tx();
          //
          xi_dircacheevent();
          xi_dircacherclview();
          xi_dirkeyname(IA_Name);
          xi_repcacheevent();          
          try {
               xi_repdatablobs(jarfile);
               xi_runmappings(IA_Name, jarfile); //Missing IN or OUT parameter at index:: 1
          } catch (Exception e) {
               e.printStackTrace();
          }
          return versionid;
     }
}


</textarea>


Xi_ExternalDefn.java


(External Definition Class)


package xidb;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Vector;


/**

  • @author Felix Jeyareuben

*/


public class Xi_ExternalDefn {


     XiDbUtils utils;


     Connection con;


     String ownerrepid;


     String relationid;


     String objectid;


     String versionid;


     String versionsetid;


     String versionsetid_2_dev;


     //String versionsetid_1_cons;


     Vector params = new Vector();


     String owner;


     String swcid;
     
     String namespace;
     
     String target_objid;
     
     public void printString() {          
             System.out.println(“objectid:”+objectid);
             System.out.println(“relationid:”+relationid);
             System.out.println(“versionid:”+versionid);
             System.out.println(“versionsetid:”+versionsetid);
             System.out.println(“versionsetid_2_dev:”+versionsetid_2_dev);       
          }
     
     public Xi_ExternalDefn(String _owner,String _swcid,String _namespace,String parentversionsetid_2_dev) {
          versionsetid_2_dev=_parent_versionsetid_2_dev;
          namespace=_namespace;
          swcid=_swcid;          
          owner = _owner;
          utils = new XiDbUtils();
          con = utils.getConnection();
          ownerrepid = XiDbUtils.generateID(32);
          relationid = XiDbUtils.generateID(32);
          objectid = XiDbUtils.generateID(32);
          versionid = XiDbUtils.generateID(32);
          versionsetid = XiDbUtils.generateID(32);
     }


     public void closeConnection()
     {
          try {
               con.close();
          } catch (SQLException e) {
               e.printStackTrace();
          }
     }
     
     public void xi_pchangelist() {
          String table_name = “xi_pchangelist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionsetid);
          params.add(“”);
          params.add(“4”);
          params.add(owner);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “NUMBER”, “VARCHAR2” });
     }


     public void xi_pverrelation() {
          String table_name = “xi_pverrelation”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 14);
          params.clear();


          params.add(relationid);
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(XiDbUtils.generateZeros(32));
          params.add(XiDbUtils.generateZeros(32));
          params.add(“0”);
          params.add(versionid);
          params.add(relationid);
          params.add(“1”);
          params.add(“1”);
          params.add(“2”);
          params.add(owner);
          params.add(XiDbUtils.getNow());


          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “RAW”, “RAW”, “RAW”, “NUMBER”, “RAW”, “RAW”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP” });
     }


     public void xi_pversion() {
          String table_name = “xi_pversion”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(relationid);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionedobj() {
          String table_name = “xi_pversionedobj”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 5);
          params.clear();
          params.add(objectid);
          params.add(“1”);
          params.add(“XI_Model_1.0”);
          params.add(“1”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER”, “NUMBER” });
     }


     public void xi_pversionset(String swcname,String vendor) {
          String table_name = “xi_pversionset”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 20);
          params.clear();
          params.add(versionsetid);
          params.add(versionsetid_2_dev);
          params.add(“_D_Standard Change List”);
          params.add(“Standard change list for software component version “swcname“, 1.0 of “+vendor);
          params.add(“3”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“1”);
          params.add(“2”);
          params.add(“0”);
          params.add(“2”);
          params.add(“0”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”,
                    “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “TIMESTAMP”, “TIMESTAMP”, “NUMBER”, “NUMBER”, “VARCHAR2”,
                    “NUMBER” });
     }


     public void xi_pvsetelement() {
          String table_name = “xi_pvsetelement”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 12);
          params.clear();
          params.add(versionsetid);
          params.add(objectid);
          params.add(versionid);
          params.add(“0”);
          params.add(“3”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });


          params.clear();
          params.add(versionsetid_2_dev);
          params.add(objectid);
          params.add(versionid);
          params.add(“2”);
          params.add(“1”);
          params.add(“0”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          params.add(“0”);
          params.add(“”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “RAW”, “NUMBER”, “NUMBER”, “NUMBER”, “NUMBER”, “TIMESTAMP”,
                    “TIMESTAMP”, “NUMBER”, “NUMBER”, “RAW” });
     }


     public void xi_pvsetelemhist() {
          String table_name = “xi_pvsetelemhist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 9);
          params.clear();
          params.add(versionsetid_2_dev);
          params.add(“1”);
          params.add(objectid);
          params.add(versionid);
          params.add(“1”);
          params.add(“0”);
          params.add(XiDbUtils.getNow());
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “RAW”, “RAW”, “NUMBER”, “NUMBER”, “TIMESTAMP”, “TIMESTAMP”,
                    “NUMBER” });
     }


     public void xi_pvsintegration(String order) {
          String table_name = “xi_pvsintegration”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 6);
          params.clear();
          params.add(order);
          params.add(versionsetid_2_dev);
          params.add(versionsetid);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “NUMBER”, “RAW”,
                    “RAW”, “VARCHAR2”, “TIMESTAMP”, “NUMBER” });
     }


     public void xi_repchangelist() {
          String table_name = “xi_repchangelist”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 3);
          params.clear();
          params.add(versionsetid);
          params.add(swcid);
          params.add(XiDbUtils.generateZeros(32));
          utils.insertRecord(con, sql, params,
                    new String[] { “RAW”, “RAW”, “RAW” });
     }


     public void xi_repdataadmin() {
          String table_name = “xi_repdataadmin”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 7);
          params.clear();
          params.add(versionid);
          params.add(objectid);
          params.add(“ifmextdef”);
          params.add(owner);
          params.add(XiDbUtils.getNow());
          params.add(owner);
          params.add(versionid);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “RAW”,
                    “VARCHAR2”, “VARCHAR2”, “TIMESTAMP”, “VARCHAR2”, “RAW” });
     }
     
     public void xi_repdataextdef(String filename,byte[] file_content) {
          String table_name = “xi_repdataextdef”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 9);
          params.clear();
          params.add(versionid);
          params.add(filename.substring(filename.lastIndexOf(“.”)+1)); //xsd,dtd,wsdl
          params.add(filename);
          params.add(“xml”);
          params.add(XiDbUtils.generateZeros(32));
          params.add(file_content);
          params.add(“1”);
          byte[] b=new byte[1];
          b[0]=32;
          params.add(b);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2”, “RAW”, “BLOB”, “NUMBER”,
                    “CLOB”,”NUMBER” });
     }


     public String xi_repkeyextsub(String name,String subname) {
          String table_name = “xi_repkeyextsub”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 6);
          params.clear();
          String obj_id=XiDbUtils.generateID(32);
          params.add(obj_id);
          params.add(“ifmextmes”);
          params.add(name);
          params.add(namespace);
          params.add(subname);
          params.add(” “);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2”, “VARCHAR2”, “VARCHAR2” });
          return obj_id;
     }


          
     public void xi_repkeyname(String name) {
          String table_name = “xi_repkeyname”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(objectid);
          params.add(“ifmextdef”);
          params.add(name);
          params.add(namespace);          
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                     “VARCHAR2”, “VARCHAR2” });
     }


     public void xi_reptexthead() {
          String table_name = “xi_reptexthead”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(“0”);
          params.add(“EN”);
          params.add(“0”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “NUMBER”,
                    “VARCHAR2”, “NUMBER” });
     }


     public void xi_reptextshort() {
          String table_name = “xi_reptextshort”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 2);
          params.clear();
          params.add(versionid);
          params.add(” “);
          utils
                    .insertRecord(con, sql, params, new String[] { “RAW”,
                              “VARCHAR2” });
     }


     public void xi_reptextshort_tx() {
          String table_name = “xi_reptextshort_tx”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 4);
          params.clear();
          params.add(versionid);
          params.add(” “);
          params.add(“EN”);
          params.add(” “);
          utils.insertRecord(con, sql, params, new String[] { “RAW”, “VARCHAR2”,
                    “VARCHAR2”, “VARCHAR2” });
     }
     
     public void xi_repdatalink(String tgt_objid) {
          String table_name = “xi_repdatalink”;
          //System.out.println(“-> ” + table_name);
          String sql = XiDbUtils.getSqlQuery(table_name, 11);
          params.clear();
          params.add(versionid);
          params.add(“_inner”);
          params.add(“0”);
          params.add(tgt_objid);
          params.add(“R”);
          params.add(“S”);
          params.add(swcid);
          params.add(“-1”);
          params.add(” “);
          params.add(“ifmextdef”);
          params.add(“ifmextmes”);
          utils.insertRecord(con, sql, params, new String[] { “RAW”,
                    “VARCHAR2″,”NUMBER”,”RAW”,
                    “VARCHAR2”, “VARCHAR2”,
                    “RAW”,”NUMBER”,”VARCHAR2″,”VARCHAR2″,”VARCHAR2″});
     }
     
     public String doCreate(String seqno,String filename,byte[] filecontent,String name,String subname,String swc_name,String vendor)
     {
          xi_pchangelist();
          xi_pverrelation();
          xi_pversion();
          xi_pversionedobj();     
          xi_pversionset(swc_name,vendor);
          xi_pvsetelement();
          xi_pvsetelemhist();
          xi_pvsintegration(seqno);
          xi_repchangelist();
          xi_repdataadmin();
          xi_repdataextdef(filename,filecontent);
          target_objid=xi_repkeyextsub(name,subname);
          xi_repkeyname(name);
          xi_reptexthead();
          xi_reptextshort();
          xi_reptextshort_tx();
          xi_repdatalink(target_objid);
          return versionid;
     }
}


</textarea>


XiScenarioHelper.java


(Used to create scenarios)


package xidb;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;


/**

  • @author Felix Jeyareuben

*/


public class XiScenarioHelper {


     String swc_name=”SWC_FJEYAR”;
     String vendor=”my_vendor”;
     String owner=”felix”;
     String namespace=”urn:fjeyar”;
     Xi_SWComponent swc;
     String scenario_name;
     
     static int sequence_no=0;
     
     public XiScenarioHelper(String scenarioname,String _owner,String swcname,String _vendor) {
          scenario_name=_scenario_name;
          swc_name=_swc_name;
          vendor=_vendor;
          owner=_owner;
     }
     
     Xi_SWComponent createSWC()
     {
          Xi_SWComponent xi_swc=new Xi_SWComponent(owner,swc_name,vendor);
          xi_swc.doCreate(Integer.toString(sequence_no++));
          swc=xi_swc;
          return xi_swc;
     }


     public void addNamespace(String _namespace) {
          swc.addNamespace(_namespace,Integer.toString(sequence_no++));
          namespace=_namespace;
     }


     public void setCurrentNamespace(String _namespace)
     {
          namespace=_namespace;
     }
     
     public Xi_ExternalDefn addExternalDefn(String extdef_name,String fullfilename) throws Exception{
          File f=new File(fullfilename);
          String filename=f.getName();
          FileInputStream fis=new FileInputStream(f);
          ByteArrayOutputStream bos=new ByteArrayOutputStream();
          int c=0;
          while((c=fis.read())!=-1)
               bos.write(c);
          fis.close();
          Xi_ExternalDefn ext=new Xi_ExternalDefn(owner,swc.objectid,namespace,swc.versionsetid_2_dev);     
          String root_element=new String(bos.toByteArray());
          root_element=root_element.substring(root_element.indexOf(“element”));
          root_element=root_element.substring(root_element.indexOf(“name=””)+”name=””.length());
          root_element=root_element.substring(0,root_element.indexOf(“””));
          ext.doCreate(Integer.toString(sequence_no++),filename,bos.toByteArray(),extdef_name,root_element,swc_name,vendor);
          return ext;
     }


     public Xi_MsgInterface addMessageInterfaceAsync(boolean outbound,String extdef_file) throws Exception {
          boolean sync=false;
          String suffix=””;
          if(outbound)
               suffix=”Outbound_MI”;
          else
               suffix=”Inbound_MI”;
          File f=new File(extdef_file);
          Xi_ExternalDefn ext=addExternalDefn(scenario_name“_ED_”f.getName(),extdef_file);          
          String MessageInterfaceName=scenario_name“_”suffix“_”f.getName();
          Xi_MsgInterface mi=new Xi_MsgInterface(owner,swc.objectid,namespace,swc.versionsetid_2_dev);
          mi.ext=ext;
          mi.doCreate(Integer.toString(sequence_no++),sync,outbound,MessageInterfaceName,swc_name,vendor,ext.target_objid);
          return mi;
     }


     public Xi_ImportedArchives addImportedArchives(String jarfilename) {
          File f=new File(jarfilename);
          String ImportedArchiveName=scenario_name“_IA_”f.getName();
          Xi_ImportedArchives ia=new Xi_ImportedArchives(owner,swc.objectid,namespace,swc.versionsetid_2_dev);
          ia.doCreate(Integer.toString(sequence_no++),ImportedArchiveName,swc_name,vendor,jarfilename);     
          return ia;
     }


     public Xi_InterfaceMapping addInterfaceMappingAsync(Xi_MsgInterface msg_in, Xi_MsgInterface msg_out,Xi_ImportedArchives ia, String classname) {
          String InterfaceMappingName=scenario_name“_IM_”classname;
          Xi_InterfaceMapping im=new Xi_InterfaceMapping(owner,swc.objectid,namespace,swc.versionsetid_2_dev);
          im.doCreate(Integer.toString(sequence_no++),InterfaceMappingName,swc_name,vendor,msg_in.ext.target_objid,msg_out.ext.target_objid,msg_in.objectid,msg_out.objectid,(String) ia.jar_entries.get(classname));               
          return null;
     }


     public Xi_MsgInterface addMessageInterfaceSync(boolean outbound, String extdef_input, String extdef_output) throws Exception {
          boolean sync=true;
          String suffix=””;
          if(outbound)
               suffix=”Outbound_MI”;
          else
               suffix=”Inbound_MI”;
          File f1=new File(extdef_input);
          Xi_ExternalDefn ext1=addExternalDefn(scenario_name“_ED_”f1.getName(),extdef_input);          
          File f2=new File(extdef_output);
          Xi_ExternalDefn ext2=addExternalDefn(scenario_name“_ED_”f2.getName(),extdef_output);
          
          String MessageInterfaceName=scenario_name“_”suffix“_”f1.getName()“_TO_”f2.getName();
          
          Xi_MsgInterface mi=new Xi_MsgInterface(owner,swc.objectid,namespace,swc.versionsetid_2_dev);
          mi.sync_target_objid=ext1.target_objid;
          mi.doCreate(Integer.toString(sequence_no++),sync,outbound,MessageInterfaceName,swc_name,vendor,ext2.target_objid);
          return mi;
     }
}


</textarea>


CreateScenario.java


(Sample Application)


package xidb;


/**

  • @author Felix Jeyareuben

*/


public class CreateScenario {


     public static void main(String[] args) throws Exception {
                    
          String namespace=”urn:cc11ss6″;
          String swc_name=”This is my RE test Scenario!”;
          String vendor=”cc11ss6″;
          String owner=”felix”;
          
          XiScenarioHelper scenario=new XiScenarioHelper(“myscenario6”,owner,swc_name,vendor);          
          Xi_SWComponent swc=scenario.createSWC();
          scenario.addNamespace(namespace);
          scenario.setCurrentNamespace(namespace);


          Xi_MsgInterface msg_in=scenario.addMessageInterfaceAsync(true,”e:/a.xsd”);
          Xi_MsgInterface msg_out=scenario.addMessageInterfaceAsync(false,”e:/b.xsd”);
          
          Xi_MsgInterface msg_sync=scenario.addMessageInterfaceSync(true,”e:/a.xsd”,”e:/b.xsd”);
          
          Xi_ImportedArchives ia1=scenario.addImportedArchives(“e:/a.jar”);          


          Xi_InterfaceMapping im1=scenario.addInterfaceMappingAsync(msg_in,msg_out,ia1,”a.class”);
          Xi_InterfaceMapping im2=scenario.addInterfaceMappingAsync(msg_in,msg_out,ia1,”b.class”);
          System.out.println(“done!”);
     }
}


Have anyone tried these Java classes? Have anyone tried to
create an XI object using these Java APIs provided? I haven’t got any
comments for the past 2 blogs of this series, but after this blog you must give
a comment esp, about, how you feel, when you run a piece of code and
suddenly an XI object pops up for which you haven’t used any standard tools provided for XI! Well, that’s the spirit of XI. The next time
when you are about to create an XI object, you are sure of what you are really
doing… and of course you will surely remember me 😉

Disclaimer:

This is just for an understanding of how
XI objects creation works from Integration builder (to build an alternative for
Integration Builder 😉 ). Tested and works on XI 3.0 SR1 but using these Java
classes will purely be at your own risk.</p>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply