Web Service Method Call - How to wait for completion then return?

Hello all,

I am running a web service method sync as I don't want to run it async and it seems to start the processing but the call goes right through to my return; line in a console app I have.  I have a try catch and I want to make sure I catch any returned errors from it.  How do I wait for the service to complete like wait for callback or something?   Please provide a simple example if you could calling the method and wait.
Who is Participating?
Without knowing which WebServices you are connecting to and what there responses are like, it is hard to tell you exactly. But usually replies from WebServices have an Error/Warning element in their reply.

So within your try catch block evaluate the response, if Error/Warning field is not empty then raise an exception

This might help:
WebServices Exception Handling
sbornstein2Author Commented:
isn't there a way with like waitcallback or something to wait until the web service completes?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.