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();
}