• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web service response time

 
jo mora
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I compute the repsonse time of an extarnel Web service and then use this information in a java application?

thanks.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
surlac surlacovich
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic