I am calling a web service from my Android application. I have many different calls to this service all through the application and every one of them is returning data in less than a second, except for one. One of my calls can take up to a minute to return the data even though the actual web service call is near instantaneous. The problem occurs with the line:
transport.call(SOAP_ACTION, soapEnvelope);
That is called and the value is returned from the web service almost instantaneously. But it can take up to a minute to reach the next line:
SoapObject result = (SoapObject) soapEnvelope.bodyIn;
What is happening between the web service returning data and the app hitting the next line (above)? Is there a way to reduce this delay? Is there anything simple to check?
Is there a way to reduce this delay? Is there anything simple to check?
The only way to know is to measure the difference in time in various areas. For a SOAP web service call these are the times to measure.
Client Application code -> Request Handlers -> Request Serialization -> Request dispatch -> HTTP Transport -> Server side
Receive HTTP Request -> De-serialization -> Application code -> Response handlers -> Serialization -> Dispatch -> HTTP Transport
The blockage is usually in the application code, handlers and the network. Measure those and you can find where the time is spent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With