Call to Web service

I need an easy way to connect tha Panda II to a remote Web Service (hosted on ASP.NET, exposed via WCF).

I tried to use MFSvcUtil.exe to create the proxy code to call via DPWS, but the exe has created only files without any useful code inside (just the basic template).

Any suggestion to have this goal?
Basically the device may upload data logged from SD, and other runtime informations, downloading configurations and so on…


Usually Web Services support REST, HTTP GET,etc. protocols as well. These protocols will be much easier to use.

If you’d like to use SOAP, however, then DPWS is the tool you’re going to want to use. As Gus is likely to point out, DPWS is one of the least-used features of NETMF, so there won’t be a lot of people with experience that can help you.

I tried it, but it’s really a fake… :frowning:

The web service was a fake?


So, it really doesn’t work or it really isn’t used much [yet]? I am just diving into these waters and intend to use WCF; oddly, against a service running on Mono hosted on a nearby FreeBSD box :wink:

This might be useful

I tried it a while, but with a lot of problem. Finally, it did create empty proxies on my client side, reporting a lot of (stupid) warnings when it downloads the WSDL from the service.
I did work a lot in the past with web services, WCF, and so on, and DPWS puts me back to early 2000s as development tool. Too many problems, too work to do for a simple service. I think that today it’s a unuseful technology, my opinion.
and this is a problem, because netMF is basically a great dev to create connected devices!

@ baz If you followed the tutorial please post something in that thread as the author is waiting for someone to try it out.

There are a two main tips/tricks I found when working on connecting my MF code to a WCF service.

  • Make sure you are using WsHttpBinding, BasicBinding does not work in MF code. In fact I had to create Basic and WsHttp endpoints for my service since Windows Phone will only connect to BasicBinding endpoints and MF only WsHttpBinding.
  • Hosting the WCF service in ASP.NET/IIS I found to be troublematic. Instead, write a console application or Windows service that use ServiceHost ( to run your WCF service.

Baz, can you post your WSDL definition you receive from the service? Maybe we can help debug why you’re having trouble with it.

Also, if you follow JREndean’s suggestion to write your own host application, there are samples in the NETMF documents directory–you’ll be interested in HelloWorldServer_WCF and HelloWorldClient_MF (assuming you’re hosting on the computer and running a client on the device).

I gave up and deleted the code… :frowning: