4 Replies Latest reply on Nov 3, 2006 3:13 PM by Tom Elrod

    Sending plain text to server without org.jboss.remoting.Clie

    Fahrettin Mehmet Öztürk Newbie

      I like to send plain text to remoting server through socket without using org.jboss.remoting.Client object like the code below:

      java.net.Socket socket = new java.net.Socket("localhost", 5400);
      java.io.PrintWriter out = new java.io.PrintWriter(socket
      .getOutputStream(), true);
      java.io.BufferedReader in = new java.io.BufferedReader(
      new java.io.InputStreamReader(socket.getInputStream()));

      out.println("To the server");

      String fromServer = in.readLine();
      System.out.println("From server: " + fromServer);

      out.close();
      in.close();
      socket.close();

      But I got "[SocketServerInvoker] Failed to accept socket connection" error. My InvokerLocator URI is "socket://localhost:5400".