This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes Web service response time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web service response time " Watch "Web service response time " New topic
Author

Web service response time

jo mora
Greenhorn

Joined: Oct 10, 2013
Posts: 2
How can I compute the repsonse time of an extarnel Web service and then use this information in a java application?

thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
The most basic approach would be to call System.currentTimeMillis() before and after the call to the WS - the difference is the round trip time for the call.


Ping & DNS - my free Android networking tools app
surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

jo mora wrote:How can I compute the repsonse time of an extarnel Web service...

If the service is synchronous:



Otherwise you need to poll status and calculate estimatedTime when web-service is finished.
jo mora
Greenhorn

Joined: Oct 10, 2013
Posts: 2
Ulf Dittmer wrote:The most basic approach would be to call System.currentTimeMillis() before and after the call to the WS - the difference is the round trip time for the call.


Please can I have an idea about how the call of a WS is done with the java language?
Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
That is an entirely different question; please start a new topic for that.

Start by reading the documentation of whichever WS library you're using; or are you saying that you're not using any right now? In that case, start reading the introductory articles on the http://www.coderanch.com/how-to/java/WebServicesFaq.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web service response time