WM6_Logo[1] Windows Mobile 6 offers a great developer experience in Visual Studio 2008. The combined features of WM6 SDK + VS2008 provide excellent new ways for testing your applications for reliability and resiliency. Testing WebServices, however, is not an out of the box experience. So, developers have to take specific steps to make sure they can consume (test) the WebServices hosted locally in the development machine from the emulator.

 

Following is my suggested sequence of steps you should take to make this work:

1) FROM WITHIN VISUAL STUDIO:

  1. The WebService proxy class will show localhost as the address for the service, if left unchanged the mobile application will never find the actual service as localhost then would be the device itself. Instead change the service URL to http://your-machine-IP-address:port#/service.asmx prior to calling into it.
  2. F5
  3. Activate the Device Emulator Manager (DEM)

2) FROM WITHIN THE DEVICE EMULATOR MANAGER

  1. The device must be in Cradle mode. Right Click on the connected device (i.e. image ) and select Cradle. -- Make sure to press Refresh (sometimes the DEM won't show which device is active)

3) FROM WINDOWS MOBILE DEVICE CENTER (WMDC) (This is required to make DMA the transport between the device and the host)

  1. Run WMDC. (Upgrade to version 6.1.6965 if necessary)image. WMDC should automatically connect to the device. On the device you will see a progress  notification similar to this image
  2. If WMDC doesn't connect,  make sure to check that it is configured to use DMA (Mobile Device Settings | Connection Settings |image. Also, you may want to check to make sure the Device transport property within Visual Studio is set to DMA (Tools | Options... | Device Tools | Devices ) image, otherwise you should see image on WMDC and be ready to go.
  3. At this point you can proceed to trigger the WebServices call.

 

Good luck in your mobility journey!

Joel