public class JavaClient {
private static final Logger log = LogManager.getLogger(JavaClient.class);
public static void main(String[] args) throws Exception {
log.info("JavaClient");
ConnectionFactory connectionFactory = ConnectionFactory
.getConnectionFactory();
Connection connection = connectionFactory.getConnection();
X_OCTET sbuf = (X_OCTET) connection.tpalloc("X_OCTET", null, 29);
sbuf.setByteArray("THIS IS YOUR CLIENT SPEAKING".getBytes());
log.info("Calling tpcall with input: %s"
+ new String(sbuf.getByteArray()));
int cd = connection.tpacall("JAVASERV", sbuf, 0);