开发者

How to get round trip time while calling SOAP webservice using KSOAP in android?

I am developing an Android application which rely on .NET web service for dynamic data. So, to communicate with SOAP web methods i am using KSOAP2 third party API. It is working fine. but i need to get the round trip time for each web service call using KSOAP2 because my application running slow wh开发者_如何学编程en compared with same application running in iPhone. So I need to know the RTT to improve the performance of my Android application.


You could wrap the call to .NET service around basic time measuring technique and add the response time in logs for later inspection. Something like this...

long start = System.currentTimeMillis();
<...call to .NET server ...>
System.out.println("Time taken: "+ ((System.currentTimeMillis() - start)) + "ms");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜