Consuming webservices from a smart device project ... <Method>Async() web method calls missing in th

  • Thread starter Thread starter Rodrigus Makon
  • Start date Start date
R

Rodrigus Makon

I thought of posting this to microsoft webservices NG but there is no activity
in those news groups.

I am consuming webservices API published by salesforce.com by adding a web
reference to a smart device project. Somehow the reference.cs does not contain
method calls such as MethodAsync() which I think are new in .NET 2.0. Am
I wrong some where here. When I create an Asp.NET 2.0 Hello World webservice
on my box and add a web reference to it in my smart device project, I can
see HelloWorldAsync() web method.

Is the generation of these methods limited to webservices created by ASP.NET.

Thanks for any insight into this.

Regards.
 
I did a test consuming this webservice on a Desktop console application,
to my very surprise, it did add those <Method>Async() calls to the reference.cs
file.

Why is this different for a smart device project. Any clues.
 
I now know why the proxy class does not include web methods that end with
Async as .netcf 2.0 does not implement the class AsyncComplemetedEventArgs
and the delegate SendOrPostCallback. These required to hadle the completed
event.
 
Thanks for sharing your thoughts on this forum. Its helpful to me too
as I am going to use webservices soon in a project. I will appriciate
if you can also share some more info about your saleforce application.

I mean what happens when you devices is not connected to a network and
hence not able to access the webservice? How do you handle this
situation in your application.

Thanks in advance,

Sachin
 
Hello Sachin,

I am using a Windows Mobile 5.0 pocketpc phone with a GPRS connection. When
I call the web service method, it will automatically connect to the GPRS
connection by establishing it if it is not already connected. If you are
using a pocketpc then you can check for a host of connectivity options by
querying into Microsoft.WindowsMobile.Status.SystemState before launching
the web service.

If you are using pre wm5.0 device, your options are limited.
 
Back
Top