SHARE
TWEET

Untitled

a guest Jan 20th, 2017 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     @WebMethod
  3.     public void handleSoapRequest() {
  4.         CompletableFuture<JsonObject> responseFuture = new CompletableFuture<>();
  5.         logger.debug("calling fleetmanager REST service- port:"+url.getPort()+" host:"+ url.getHost()+" path:/fleets/"+Config.getFleetId()+"/vehicles");
  6.         if (!check(key)) {
  7.             vertx.createHttpClient().getNow(url.getPort(), url.getHost(), "/groups/"+Config.getGroupId()+"/cars",  new Handler<HttpClientResponse>() {
  8.  
  9.                 public void handle(HttpClientResponse httpClientResponse) {
  10.  
  11.                     httpClientResponse.bodyHandler(new Handler<Buffer>() {
  12.                         public void handle(Buffer buffer) {
  13.                             logger.debug("Response (" + buffer.length() + "): ");
  14.                             logger.debug(buffer.getString(0, buffer.length()));
  15.                             jsonReply = buffer.toJsonObject();
  16.                             responseFuture.complete(jsonReply);
  17.                         }
  18.                     });
  19.                 }});
  20.         }
  21.         return responseFuture.get();
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top