Mincom Ellipse and Java

Author:

(image courtesy of www.penn-olson.com)

I’ve been working on integration between java application and mincom ellipse since first of july 2011.

For almost a month, i’ve been trying to upload data from my Application onto Ellipse using their Business object using mincom connector provided by mincom. I read all pages on mincom connector documentation and BOC and trying to look more guidance from only one forum i’ve found on the internet. But i’ve no luck, i still can’t get into the ellipse.

I read from this forum , mincom itself suggests to use old scrapping screen simulation instead of using direct Business object. But, there’s a problem, mincom connector documentation said i’ve to supply screen buffer file list to the connection properties. And the the biggest problem just begin. Almost all CD’s of mincom ellipse installer extracted, but i couldn’t find any files related to Screen Buffer File list.

Finally, as my last effort to find the answer, i extracted and decompile almost all classes in mincom connector library, and read line per line to find the method related to it’s method to initiate connection with supplied Buffer File List.

And Voilla …..

i’ve find a line, that explicitly state that  there’s another method instead of using Buffer files list, we just need to supply this String into connection properties :

“DOWNLOADED_XML”

and my connection properties become :

sessionFactory.getSession(“Cics”,”DOWNLOADED_XML”)

and finally now it’s working perfectly …

and I can communicate with Mincom Ellipse server smoothly …

 

Wednesday, July 20th 2011

Tanjung Enim

(PTBA, Muara Enim Palembang)

 

A. Ahmad Kusumah

 

 

 

 

 

15 thoughts on “Mincom Ellipse and Java”

  1. Dear friend,

    I have been struggling for weeks trying to integrate a Java application into Mincom Ellipse ERP installed on IBM CICS Transaction Gateway. I am not sure of the correction connection parameters though. If possible please can you look at the code below and let me know if I am supplying the correct connection parameters? (I would really appreciate any help with this please:-))

    //Declarations
    MimsSessionFactory sessionFactory = MimsSessionFactory.getMimsSessionFactory();

    IMimsSession mySession = sessionFactory.getMimsSession(“Cics”);
    mySession.setTracing();
    MIMSBlock myBlock = new MIMSBlock();
    MIMSRequest myRequest = myBlock.getRequests().create();

    // Determine whether the session is connected, and if not, then connect
    if (!mySession.isConnected()) {
    try {

    mySession.connect(Servername:portnumber,2006, “Username”, “Password”);
    mySession.login(“Username”,”Password”,”DistrictCode”,””);
    }
    catch (InterruptedIOException i) {
    System.out.println(“InterruptedIOException caught i=” + i.getMessage());
    }
    catch (IOException e) {
    System.out.println(“IOException caught e=” + e.getMessage());
    }
    catch (ServerException e) {
    System.out.println(“ServerException caught e=” + e.getMessage() + e.block + e.block.makeCbrBuffer(3));
    }
    /*
    catch (MwareException e) {
    System.out.println(“MwareException caught e=” + e.getMessage() + e.block);
    }
    */
    catch (CBRException e) {
    System.out.println(“CBRException caught e=” + e.getMessage());
    } }

    Thanks and regards,
    Brendon

    1. Dear Brendon,
      your configuration will work only for direct integration using Mincom Business object (BOC) which is really quite painful.
      I recommend using scrapping screen simulation instead of using BOC.
      below is my configuration for scrapping screen simulation:

      private IMimsSession mySession;
      private String buflib = “DOWNLOADED_XML”;

      String tp;
      String host;
      String port;
      String userHost;
      String passHost;

      String userEllipse;
      String passEllipse;
      String posisi;
      /**
      * EllipseConnection constructor
      */
      public ConnectionEllipseSource() {
      initConnection();
      }
      private void initConnection(){
      try{
      MasterService ms = new MasterService();
      AdmEllipse ell = ms.getEllipseConfiguration();
      this.tp = ell.getTipe();
      this.host = ell.getServer();
      this.port = String.valueOf(ell.getPort());
      this.userHost = ell.getUserHost();
      this.passHost = ell.getPasswordHost();
      this.userEllipse = ell.getUserName().toUpperCase();
      this.passEllipse = ell.getPassword().toUpperCase();
      this.posisi = ell.getPosisi();

      }catch (Exception e) {
      e.printStackTrace();
      }
      }

      /**
      * Set the location of the bfl files (for MSO access)
      * @param location
      */
      public void setBufferLibraryLocation(String location) {
      buflib = location;
      }

      /**
      * Connect to the Ellipse server
      * @param TP
      * @param hostName
      * @param portNumber
      * @param hostUsername
      * @param hostPassword

      * @throws EllipseLoginException
      * @throws EllipseConnectionException */

      public void connect(String TP, String hostName, int portNumber, String hostUsername, String hostPassword) throws EllipseLoginException {

      MimsSessionFactory sessionFactory = MimsSessionFactory.getMimsSessionFactory();
      mySession = sessionFactory.getMimsSession(TP,buflib);
      try {
      mySession.connect(hostName, portNumber, hostUsername, hostPassword);
      } catch (InterruptedIOException e) {
      throw new EllipseLoginException(e.toString());
      } catch (IOException e) {
      e.printStackTrace();
      throw new EllipseLoginException(e.toString());
      } catch (CBRException e) {
      throw new EllipseLoginException(e.toString());
      }
      }

      /**
      * connect without injecting parameter

      * @throws EllipseLoginException */
      public void connect() throws EllipseLoginException {

      MimsSessionFactory sessionFactory = MimsSessionFactory.getMimsSessionFactory();
      mySession = sessionFactory.getMimsSession(this.tp,this.buflib);
      try {
      System.out.println(this.host+”>>> “+this.passHost);
      mySession.connect(this.host,0, this.userHost, this.passHost);
      System.out.println(mySession);
      } catch (InterruptedIOException e) {
      throw new EllipseLoginException(e.toString());
      } catch (IOException e) {
      e.printStackTrace();
      throw new EllipseLoginException(e.toString());
      } catch (CBRException e) {
      throw new EllipseLoginException(e.toString());
      }
      }

      /**
      * This method attempts to login to the Ellipse server.
      * @param mimsUser
      * @param mimsPwd
      * @param district
      * @param position

      * @throws EllipseLoginException
      * @throws EllipseConnectionException */
      //login to mims
      public void login(String mimsUser,String mimsPwd,String district,String position) throws EllipseLoginException {
      try {
      mySession.login(mimsUser,mimsPwd,district,position);
      } catch (CBRException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      } catch (MwareException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      } catch (ServerException e) {
      throw new EllipseLoginException(trimQuotes(e.getLocalizedMessage()));
      } catch (IOException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      }
      }

      /**
      * using param from ellipse.properties

      * @throws EllipseLoginException */
      public void login() throws EllipseLoginException {
      try {
      mySession.login(this.userEllipse,this.passEllipse,”PTBA”,this.posisi);
      } catch (CBRException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      } catch (MwareException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      } catch (ServerException e) {
      throw new EllipseLoginException(trimQuotes(e.getLocalizedMessage()));
      } catch (IOException e) {
      throw new EllipseLoginException(trimQuotes(e.toString()));
      }
      }

      /**
      * This method attempts to disconnect from the Ellipse server.

      * @throws EllipseLoginException
      * @throws EllipseConnectionException */
      //disconnect from mims server
      public void disconnect() throws EllipseLoginException {
      try {
      mySession.disconnect();
      } catch (IOException e) {
      throw new EllipseLoginException(e.toString());
      } catch (CBRException e) {
      throw new EllipseLoginException(e.toString());
      }
      }

      /**
      * Get the current connection to Ellipse

      * @return IMimsSession: The current Ellipse session */
      public IMimsSession getSession() {
      return mySession;
      }

      1. Hi Aah Ahmad, Thanks very much for your reply. I am still getting connection errors though.

        MasterService and AdmEllipse don’t seem to part of the Java Middleware API. Please can you tell me where to get these classes? Or did you perhaps create these yourself?

        Secondly please can you let me know what parameters you need to supply to @param TP if I were to hardcode this for CICS connectivity?

        Many thanks and kind regards,
        Brendon

  2. MasterService and AdmEllipse is my connector to read parameter stored on database.

    If you want use Cics connectivity, you can directly write Cics as replacement of TP Parameter.

    But, if you want to use CICS connectivity, you shoud have install CICS transaction gateway first and configure the CTG.ini and activate it.

    this my own step in order to make my connection working well:
    1. Install CICS Transaction gateway. in this case for example i install on a machine 10.1.1.160

    2. Configure the CTG.ini configuration. below is my sample

    SECTION CLIENT = *
    CPIPADDRESSMASK=00000000
    ENABLEPOPUPS=Y
    LOGFILE=CICSCLI.LOG
    TCP62PORT=0
    MAXBUFFERSIZE=32
    MAXREQUESTS=256
    MAXSERVERS=10
    MAXWRAPSIZE=0
    REMOTENODEINACTIVITYPOLLINTERVAL=60
    SRVRETRYINTERVAL=60
    TERMINALEXIT=EXIT
    TRACEFILE=CICSCLI.BIN
    USEOEMCP=Y
    LOADMANAGER=N
    ENDSECTION

    SECTION SERVER = ellprd
    DESCRIPTION=Production Instance
    UPPERCASESECURITY=N
    USENPI=N
    PROTOCOL=TCPIP
    NETNAME=10.1.1.214
    PORT=9000
    CONNECTTIMEOUT=0
    TCPKEEPALIVE=N
    ENDSECTION

    SECTION DRIVER = TCPIP
    DRIVERNAME=CCLWNTIP
    ENDSECTION

    SECTION LOADMANAGER
    TYPE=1
    Timeout=60
    ENDSECTION

    netname :10.1.1.214 is machine where Ellipse server installed
    Port : 9000 is the port of ellipse service

    3. Start service CICS Transaction gateway. you can invoke ctgstart command.
    4. configure the ellipse connection :
    //connec to to ellipse server
    mySession.connect(“10.1.1.160:ellprd”, 0, “guest”, “guest”);

    //then login if connection success:
    mySession.login(“USER”,”PASSWORD”,””,””);

    1. complete configuration on step 4:

      mySession = sessionFactory.getMimsSession(“Cics”,”DOWNLOADED_XML”);

      //connec to to ellipse server
      mySession.connect(“10.1.1.160:ellprd”, 0, “guest”, “guest”);

      //then login if connection success:
      mySession.login(“USER”,”PASSWORD”,””,””);

      1. Hi Aah Ahmad

        Thanks very much for your response. I really appreciatet it. I am getting a “Connection refused” exception below though. I am pretty sure I am supplying the correct paremers inside my code though because these same parameters work when I log on using the Ellipse explorer.

        2011.11.24.16.39.04.352 Tracing flags set to ‘01777777777777777757777’
        2011.11.24.16.39.04.352 CONNECT: CICS specific connect() requested (10.10.10.10/
        ellip/) on port 0
        2011.11.24.16.39.05.283 Error! CICS GATEWAY ERROR ‘CCL6651E: Unable to connect t
        o the Gateway. [address = 10.10.10.10, port = 2006] [java.net.ConnectException:
        Connection refused: connect]’
        IOException caught e=CICS GATEWAY ERROR ‘CCL6651E: Unable to connect to the Gate
        way. [address = 10.10.10.10, port = 2006] [java.net.ConnectException: Connection
        refused: connect]’

        I am using these connection parameters:

        mySession.connect(“10.10.10.10:ellip”, 0, “”,””);
        mySession.login(“USERNAME”,”PASSWORD”,”0001″,””);

        The above parameters work fine for logging in using Ellipse Explorer.

        Please can you let me know if there is anything else I need to check? (This is the first time I am doing this, therefore I am quite new to this)

        Many thanks and kind regards,
        Brendon

  3. From your error tracing, it seems your CICS transaction gateway is not running yet.
    is your transaction gateway installed on 10.10.10.10 machine ?
    is the service already started ?
    may you write here your environment topology ?

    1. Hi Aah Ahmand

      Thanks very much for the feedback. It may be a user login issue. I will let you know.

      Thanks and regards,
      Brendon

        1. Hi Aah Ahmand

          The problem was that CICS and ELLIPSE were on 2 different servers. To solve the problem, we pointed these connection parameters mySession.connect(“CICSServer.com:ellip”, 0, “GUEST”,”GUEST”); to the CICS server where CICS Transaction Gateway is installed and not where Ellipse is installed.

          Many thanks for all your help.

          Kind regards,
          Brendon

  4. Dh. p’Ahmad,

    Pertama, maaf apabila comment ini tidak berhubungan dengan topik di atas. Apabila p’Ahmad tidak keberatan, apakah p’Ahmad memiliki dokumentasi mengenai tata cara menginstall aplikasi Mincom di platform apa saja, bolehkah saya minta dikirimkan ?

    Saya sedang tertarik mendalami ERP Mincom Ellipse, selama ini saya menggunakan Mapics XP dan MFG/PRO QAD.

    Referensi mengenai tata cara installasi hanya untuk keperluan pribadi, untuk mempelajari struktur / kebutuhan software Mincom Ellipse.

    Terimakasih.

    Salam,
    Virgani Dhirgacahya
    [email protected]

  5. I am having issues with the Screen Buffer Library. What do you need loaded onto the machine running the java program to use “DOWNLOADED_XML” as the SBL?

    I am currently getting the following ScreenException exception: “Unable to load buffer library using ‘DOWNLOADED_XML’: null”

  6. @Edward : what kind of configuration did you use ? Cics ? If Using Cics, you can use my connector class above. what you need is just all mincom library for java connector shipped with Mincom Ellipse .

  7. masbro, I have problems about how to use the software “Ellipse mincom”, can you help me?
    i need some tutorial document “softcopy” that can help me to know how to use the software. I have a problem about that. please share your tutorial document to my e-mail.
    “mas_brother”, sorry if I make you busy cause the request.
    makasih masbro. . .

    sincerely
    hendy
    Tanjung Enim
    [email protected]

  8. Hi Kusumah

    When utilizing the Java Middleware Library (Mincom Connector) to connect to Ellipse that is hosted on a CICS Transaction Server, do you need to use the IBM CICS Transaction Gateway / Universal Client, or can you connect to Ellipse directly?

    i.e. do we need to install an additional piece of software (IBM CICS Transaction Gateway / Universal Client) in order to connect to the Ellipse ERP, is there a mechanism to connect directly to Ellipse utilizing the JAVA libraries?

Leave a Reply to Brendon Daniel Cancel reply

Your email address will not be published. Required fields are marked *