Search in sources :

Example 11 with Response

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.

the class TPACallService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("testtpacall_service");
    int len = 20;
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
    toReturn.setByteArray("testtpacall_service".getBytes());
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_OCTET(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)

Example 12 with Response

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.

the class TPCallXOctetZeroService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    byte[] recv = ((X_OCTET) svcinfo.getBuffer()).getByteArray();
    byte[] toSend = new byte[recv.length];
    int j = recv.length;
    for (int i = 0; i < toSend.length; i++) {
        toSend[i] = recv[--j];
    }
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
    toReturn.setByteArray(toSend);
    return new Response((short) 0, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_OCTET(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)

Example 13 with Response

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.

the class RollbackOnlyTpcallTPEOTYPEService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("test_tpcall_TPEOTYPE_service");
    int len = 60;
    X_COMMON toReturn = (X_COMMON) svcinfo.getConnection().tpalloc("X_COMMON", "test");
    toReturn.setByteArray("key", "test_tpcall_TPEOTYPE_service".getBytes());
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_COMMON(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON)

Example 14 with Response

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.

the class RollbackOnlyTprecvTPEVSVCFAILService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("test_tprecv_TPEV_SVCFAIL_service");
    int len = 60;
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
    toReturn.setByteArray("test_tprecv_TPEV_SVCFAIL_service".getBytes());
    return new Response(Connection.TPFAIL, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_OCTET(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)

Example 15 with Response

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.

the class RollbackOnlyTpcallTPESVCFAILService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("test_tpcall_TPESVCFAIL_service");
    int len = 60;
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
    toReturn.setByteArray("test_tpcall_TPESVCFAIL_service".getBytes());
    return new Response(Connection.TPFAIL, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_OCTET(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)

Aggregations

Response (org.jboss.narayana.blacktie.jatmibroker.xatmi.Response)35 X_OCTET (org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)29 ConnectionException (org.jboss.narayana.blacktie.jatmibroker.xatmi.ConnectionException)12 ConfigurationException (org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException)8 StringTokenizer (java.util.StringTokenizer)3 X_C_TYPE (org.jboss.narayana.blacktie.jatmibroker.xatmi.X_C_TYPE)3 IOException (java.io.IOException)2 List (java.util.List)2 Buffer (org.jboss.narayana.blacktie.jatmibroker.xatmi.Buffer)2 ResponseException (org.jboss.narayana.blacktie.jatmibroker.xatmi.ResponseException)2 X_COMMON (org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON)2 StringReader (java.io.StringReader)1 UnknownHostException (java.net.UnknownHostException)1 ArrayList (java.util.ArrayList)1 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)1 CodecFactory (org.jboss.narayana.blacktie.jatmibroker.codec.CodecFactory)1 Codec (org.jboss.narayana.blacktie.jatmibroker.core.transport.Codec)1 Message (org.jboss.narayana.blacktie.jatmibroker.core.transport.Message)1 Receiver (org.jboss.narayana.blacktie.jatmibroker.core.transport.Receiver)1