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

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.
 
R

Rodrigus Makon

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.
 
V

Venkat Polisetti

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.
 
S

Sachin Palewar

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
 
V

Venkat Polisetti

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top