0

I am developing a WP8 application. I created a web service on out-systems and then I am calling those web service methods in my app:

ServiceReference1.WebServiceClient ws = new WebServiceClient();
ws.FetchInboxAsync(EmailId);

Now what I want is 10 seconds timeout while trying to access the web service and retry 3 times before throwing an error but I am not sure how to achieve this.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
rituraj346
  • 23
  • 4

1 Answers1

0

WebServiceClient is no standard class which exists in WP8. You will have to provide details about the connection layer you are using.

I assume you are ussint httpWebRequest for the connection. In this case, you can view this thread for details on how to define the timeout. After 3 timeouts you will then have to return an exception or error message.

How to set Timeout for httpwebrequest in windows phone 8 app?

Community
  • 1
  • 1
eX0du5
  • 896
  • 7
  • 16
  • I have created a web service on out-systems with the name `WebService` which contains few methods e.g `FetchInbox`. Now I added its link as service reference (named as `ServiceReference1`) on Visual studio. This is how I get the class `WebServiceClient` in `ServiceReference1` namespace which I use to call the WebService methods. This is it as far as connection layer is concerned. Unlike your assumption, I don't use httpWebRequest. – rituraj346 Apr 03 '14 at 05:15
  • Then what communication class is used to do the actual communication? We do not know how your code looks inside. – eX0du5 Apr 03 '14 at 14:19