How to verify the ACE-CORBA service local windows machine

106 Views Asked by At

I'm able to create docker container for ACE-TAO service , and able to access it from parent windows machine using port-forwarding concept.

From browser i try to hit the localhost:forward-port and getting "ERR_EMPTY_RESPONSE" and TAO service is running in docker container.

If I want to verify in local, whether its connected properly or not.
How can I write Java code to verify?

1

There are 1 best solutions below

3
On

The following java code connects to localhost:17500 and prints out a message saying whether or not it could create a tcp connection.

import java.io.*;
import java.net.*;

class TCPClient
{
 public static void main(String argv[]) throws Exception
 {
   try {
    Socket clientSocket = new Socket("localhost", 17500);
    System.out.println("Could connect");
   }
   catch (ConnectException e) {
    System.out.println("Cannot connect");
   }
 }
}