Package org.jboss.narayana.blacktie.jatmibroker.xatmi

Examples of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response


    byte[] args = "test=test2,tx=true".getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        args.length);
    buffer.setByteArray(args);

    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    assertNotSame("test=test2,tx=true", responseData);
  }
View Full Code Here


    byte[] args = "test=test3,tx=false".getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        args.length);
    buffer.setByteArray(args);

    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    assertEquals("test=test3,tx=false", responseData);
  }
View Full Code Here

    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        args.length);
    buffer.setByteArray(args);

    JABTransaction transaction = startTx();
    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    transaction.commit();
    assertNotSame("test=test4,tx=false", responseData);
  }
View Full Code Here

    byte[] args = "test=test5,tx=create".getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        args.length);
    buffer.setByteArray(args);

    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    assertEquals("test=test5,tx=create", responseData);
  }
View Full Code Here

  public void test_tpsend_non_TPCONV_session() throws ConnectionException {
    server.tpadvertiseTestTPSendNonTPCONVService();

    try {
      Response rcvbuf = connection.tpcall(
          RunServer.getServiceNameTPSendNonTPCONVService(), sendbuf,
          0);
      fail("Received a rcvbuf: " + rcvbuf);
    } catch (ConnectionException e) {
      assertTrue(e.getTperrno() == Connection.TPESVCERR);
View Full Code Here

    try {
      BT_NBF buffer = (BT_NBF) connection.tpalloc("BT_NBF", "employee", 0);
      assertTrue(buffer.btaddattribute("name", "zhfeng"));
      assertTrue(buffer.btaddattribute("id", new Long(1001)));
     
      Response resp = connection.tpcall(RunServer.getServiceNameNBF(), buffer, 0);
      assertTrue(resp != null);
     
      BT_NBF rcvbuf = (BT_NBF)resp.getBuffer();
      assertTrue(rcvbuf != null);
      log.info(rcvbuf);
      Long id = (Long)rcvbuf.btgetattribute("id", 0);
      assertTrue(id.longValue() == 1234);
      String name = (String)rcvbuf.btgetattribute("name", 0);
View Full Code Here

    assertTrue(cd2 != -1);
    assertTrue(cd1 != cd2);

    // RETRIEVE THE RESPONSE
    int cdToGet = cd1;
    Response response = connection.tpgetrply(cdToGet, Connection.TPGETANY);
    assertTrue(response.getCd() == cd2);
    assertTrue(TestTPConversation.strcmp(response.getBuffer(),
        "test_tpgetrply_TPGETANY_two") == 0);
  }
View Full Code Here

    assertTrue(cd2 != -1);
    assertTrue(cd1 != cd2);

    // RETRIEVE THE RESPONSE
    int cdToGet = cd1;
    Response response = connection.tpgetrply(cdToGet, 0);
    assertTrue(response.getCd() == cd1);
    assertTrue(TestTPConversation.strcmp(response.getBuffer(),
        "test_tpgetrply_TPGETANY_one") == 0);
  }
View Full Code Here

    byte[] toSend = command.getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        toSend.length);
    buffer.setByteArray(toSend);

    Response response = connection.tpcall("BTStompAdmin", buffer, 0);

    byte[] responseData = ((X_OCTET) response.getBuffer()).getByteArray();
    assertEquals(expectation, responseData[0]);
  }
View Full Code Here

    byte[] toSend = command.getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
        toSend.length);
    buffer.setByteArray(toSend);

    Response response = connection.tpcall("BTDomainAdmin", buffer, 0);

    byte[] responseData = ((X_OCTET) response.getBuffer()).getByteArray();
    assertEquals(expectation, responseData[0]);
  }
View Full Code Here

TOP

Related Classes of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response

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.