2014-09-23 41 views
0

我是新玩框架。我有一個網絡服務網址。到那個URL我附加了一些參數。我想在將值附加到該URL後顯示該URL。 這裏是我的代碼: 如何在播放框架中顯示web服務的絕對url

public JsonNode getCustomerDetails(CustomerDto customerDto){ 
    String feedUrl = Constants.ERP_CUSTOMER_URL; 
    WSRequestHolder wsHolder = null; 
    wsHolder = WS.url(feedUrl); 
    wsHolder.setAuth(Constants.ERPUSERNAME, Constants.ERPPASSWORD,Realm.AuthScheme.BASIC); 
    whereClause.append("mobileno='").append(customerDto.getMobile()).append("'") 
       .append(ORDER_BY_UPDATED_ASC); 
    wsHolder.setQueryParameter(_WHERE, whereClause.toString());`` 
    F.Promise<WS.Response> response = wsHolder.get(); 
    json = response.get().asJson(); 
} 

Constants.ERP_CUSTOMER_URL是我的web服務的URL,我追加mobileno。我想在將值附加到它後顯示我的web服務的絕對URL。我試圖顯示wsHolder但它顯示爲[email protected]

回答

0

您可以將WS.Response物體像上getUri()看看吧:

response.get().map((Function) response -> { 
    System.out.println(response.getUri());  
    } 
);