Package org.jboss.narayana.blacktie.jatmibroker.jab

Examples of org.jboss.narayana.blacktie.jatmibroker.jab.JABMessage


    JABServiceInvoker jabService = new JABServiceInvoker(
        RunServer.getServiceNametpcallXCType(), jabSession, "X_C_TYPE",
        "acct_info");

    // Assemble the message ByteArrayOutputStream baos = new
    JABMessage dos = jabService.getRequest();
    dos.setLong("acct_no", 12345678);
    dos.setByteArray("name", "TOM".getBytes());
    float[] foo = new float[2];
    foo[0] = 1.1F;
    foo[1] = 2.2F;
    dos.setFloatArray("foo", foo);

    double[] balances = new double[2];
    balances[0] = 1.1;
    balances[1] = 2.2;
    dos.setDoubleArray("balances", balances);

    jabService.call(null);

    JABMessage response = jabService.getResponse();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_c_type".getBytes(), 0, expected, 0, 15);
    byte[] received = response.getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
    jabSession.closeSession();
  }
View Full Code Here


    JABServiceInvoker jabService = new JABServiceInvoker(
        RunServer.getServiceNametpcallXCType(), jabSession, "X_C_TYPE",
        "acct_info");

    // Assemble the message ByteArrayOutputStream baos = new
    JABMessage dos = jabService.getRequest();
    dos.setLong("acct_no", 12345678);
    dos.setByteArray("name", "TOM".getBytes());
    float[] foo = new float[2];
    foo[0] = 1.1F;
    foo[1] = 2.2F;
    dos.setFloatArray("foo", foo);

    double[] balances = new double[2];
    balances[0] = 1.1;
    balances[1] = 2.2;
    dos.setDoubleArray("balances", balances);

    JABTransaction transaction = new JABTransaction(jabSession, 5000);
    jabService.call(transaction);
    transaction.commit();

    JABMessage response = jabService.getResponse();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_c_type".getBytes(), 0, expected, 0, 15);
    byte[] received = response.getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
    jabSession.closeSession();
  }
View Full Code Here

    JABServiceInvoker jabService = new JABServiceInvoker(
        RunServer.getServiceNametpcallXCType(), jabSession, "X_C_TYPE",
        "acct_info");

    // Assemble the message ByteArrayOutputStream baos = new
    JABMessage dos = jabService.getRequest();
    dos.setLong("acct_no", 12345678);
    dos.setByteArray("name", "TOM".getBytes());
    float[] foo = new float[2];
    foo[0] = 1.1F;
    foo[1] = 2.2F;
    dos.setFloatArray("foo", foo);

    double[] balances = new double[2];
    balances[0] = 1.1;
    balances[1] = 2.2;
    dos.setDoubleArray("balances", balances);

    jabService.call(null);

    JABMessage response = jabService.getResponse();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_c_type".getBytes(), 0, expected, 0, 15);
    byte[] received = response.getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
    jabSession.closeSession();
  }
View Full Code Here

    JABServiceInvoker jabService = new JABServiceInvoker(
        RunServer.getServiceNametpcallXCType(), jabSession, "X_C_TYPE",
        "acct_info");

    // Assemble the message ByteArrayOutputStream baos = new
    JABMessage dos = jabService.getRequest();
    dos.setLong("acct_no", 12345678);
    dos.setByteArray("name", "TOM".getBytes());
    float[] foo = new float[2];
    foo[0] = 1.1F;
    foo[1] = 2.2F;
    dos.setFloatArray("foo", foo);

    double[] balances = new double[2];
    balances[0] = 1.1;
    balances[1] = 2.2;
    dos.setDoubleArray("balances", balances);

    JABTransaction transaction = new JABTransaction(jabSession, 5000);
    jabService.call(transaction);
    transaction.commit();

    JABMessage response = jabService.getResponse();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_c_type".getBytes(), 0, expected, 0, 15);
    byte[] received = response.getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
    jabSession.closeSession();
  }
View Full Code Here

TOP

Related Classes of org.jboss.narayana.blacktie.jatmibroker.jab.JABMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.