7 Replies - 3446 Views - Last Post: 09 October 2011 - 01:51 PM

#1 Pablo3728  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 69
  • Joined: 13-October 09

Web Service problem with asynchronous

Posted 06 October 2011 - 11:51 AM

Hello! I have the next problem...

I have a Phone project, that has a protableLibrary. This protableLibrary (GameEngine) has to consume a web service called appServiceWS. The problem is, I need that this WS don't be asynchronous, becouse I need to take some data, to use in my phone application.

Can i do something with that? how?

Thank you!
Is This A Good Question/Topic? 0
  • +

Replies To: Web Service problem with asynchronous

#2 eclipsed4utoo  Icon User is online

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,958
  • Joined: 21-March 08

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 12:52 PM

Define "Phone". Do you mean Windows Phone 7? Or Windows Mobile?

If Windows Phone 7, then no, you can't do it non-asynchronously. Silverlight(which is what WP7 apps are written in) only supports asynchronous calls to services.

If you are referring to Windows Mobile, then yes, you can do synchronous calls.
Was This Post Helpful? 0
  • +
  • -

#3 Pablo3728  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 69
  • Joined: 13-October 09

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 01:17 PM

Hello!

Yes, it is windows phone 7.

thank you for your answer. I understand. So, if I want to call some operation since my wphone proyect, I have to call the asynchronous operation, without a problem, or I have to do something more??

Perhaps I am lost!
Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is online

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,958
  • Joined: 21-March 08

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 01:42 PM

When you consume the web service, a proxy class is created that contains the methods of the web service that you call. Those methods will be async. You simply call the method and they will execute asynchronously. There is nothing else you have to do...other than handle the Completed event so you will know when the web service call completes.
Was This Post Helpful? 0
  • +
  • -

#5 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2250
  • View blog
  • Posts: 9,432
  • Joined: 29-May 08

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 01:55 PM

Have a look at the Async stuff coming in futures release of .net and the versions of C# and vb.net. You can currently access some it via the Asynce CTP but it will not be a refined as the "blessed" release.

Build 2011 Session Videos:
The zen of async: Best practices for best performance
The Future of C# & VB.net

This post has been edited by AdamSpeight2008: 06 October 2011 - 02:04 PM

Was This Post Helpful? 0
  • +
  • -

#6 Pablo3728  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 69
  • Joined: 13-October 09

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 02:04 PM

Thank you again!

The thing is that, All the operation in the windows phone are async.
Well, since phone, I call the library with an operation (that is async, and return something), and in the library I call a web Service (that is async too, and return something too), so, I have a async, that call an async, that returns somthing. This is my problem. I don't know what to do!

Thank you!!!!
Was This Post Helpful? 0
  • +
  • -

#7 eclipsed4utoo  Icon User is online

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,958
  • Joined: 21-March 08

Re: Web Service problem with asynchronous

Posted 06 October 2011 - 02:45 PM

We actually have a tutorial for just that situation.

Silverlight: Performing Multiple Asynchronous Calls
Was This Post Helpful? 0
  • +
  • -

#8 Pablo3728  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 69
  • Joined: 13-October 09

Re: Web Service problem with asynchronous

Posted 09 October 2011 - 01:51 PM

Thank you for all! at the end, we decided to do, that the web service be consumed for the application Phone! and works ok! thank you!
I don't know how to put resolved (to the topic)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1