public void test_tpcall_x_octet_with_tx() throws Exception {
log.debug("JABTestCase::test_tpcall_x_octet_with_tx");
runServer.tpadvertisetpcallXOctet();
JABSessionAttributes jabSessionAttributes = new JABSessionAttributes();
JABSession jabSession = new JABSession(jabSessionAttributes);
JABTransaction transaction = new JABTransaction(jabSession, 5000);
JABServiceInvoker jabService = new JABServiceInvoker(
RunServer.getServiceNametpcallXOctet(), jabSession, "X_OCTET",
null);
jabService.getRequest().setByteArray("X_OCTET",
"test_tpcall_x_octet".getBytes());
log.debug("calling tpcall_x_octet with tx");
jabService.call(transaction);
log.debug("called tpcall_x_octet with tx, commiting ...");
transaction.commit();
log.debug("tpcall_x_octet commit ok");
byte[] expected = new byte[60];
System.arraycopy("tpcall_x_octet".getBytes(), 0, expected, 0, 14);
byte[] received = jabService.getResponse().getByteArray("X_OCTET");
assertTrue(Arrays.equals(expected, received));