Example #1
0
 @GET
 @Path("ior.txt")
 @Produces(MediaType.TEXT_PLAIN)
 public Response getIORFile() {
   String responseStr = mockNsili.getIorString() + "\n";
   Response.ResponseBuilder response = Response.ok(responseStr);
   return response.build();
 }
Example #2
0
  public static void main(String args[]) {
    if (args.length != 1) {
      System.out.println(
          "ERROR: Cannot start the mock NSILI server; No ports specified."
              + "\nProvide arguments in format: [WEB_PORT], [CORBA_PORT]");
      return;
    }

    String[] ports = args[0].split(",");

    int webPort = Integer.parseInt(ports[0]);
    int corbaPort = Integer.parseInt(ports[1]);

    mockNsili.startWebServer(webPort);
    mockNsili.startMockServer(corbaPort);

    System.exit(0);
  }
Example #3
0
 /**
  * Default constructor needed only in the context of integration tests outside the use of
  * dependency injection. Instantiated by reflection in @link{MockNsili}
  */
 public MockWebService() {
   this.mockNsili = MockNsili.getInstance();
 }