Web Services on Devices Sample Code

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

Applies to Windows Embedded CE 6.0 R2

The following three samples demonstrate how to create applications that use Web Services on Devices functionality.

  • The stock quote sample demonstrates basic client application and device host development, and illustrates simple control messaging.
  • The eventing sample provides a client application and creates a service on a device host, and then connects the client application to the device host/service.
  • The file service sample illustrates simple control messaging, eventing, and attachments.

The following illustration shows the messages exchanged in the file service sample.

Bb821909.4e203484-22eb-4b90-b199-59d505319a03(en-us,MSDN.10).gif

Stock Quote

The stock quote sample demonstrates basic client and device development, and illustrates simple control messaging. The service is a Windows Embedded CE console application that starts listening on a specified endpoint. The service shuts down when the user presses a key. The client application is a Windows Embedded CE console application that connects to a specified endpoint and sends a single GetLastTradePrice message to the service before the service shuts down.

Files Description

%_WINCEROOT%\public\servers\sdk\samples\wsd\StockQuoteService.exe

Stock quote service

%_WINCEROOT%\public\servers\sdk\samples\wsd\ StockQuoteClient.exe

Stock quote client

Eventing Sample

The basic eventing sample provides a client application and a service on a device host. The Basic Eventing service is hosted in the device host, which runs in the application that starts listening on a specified endpoint. The service waits for the user to press any key before it sends 100 events to subscribed client applications. The Basic Eventing Client application is a Windows Embedded CE console application that connects to a specified endpoint and receives events from it.

Files Description

%_WINCEROOT%\public\servers\sdk\samples\wsd\BasicEventingService.exe

Basic eventing service

%_WINCEROOT%\public\servers\sdk\samples\wsd\BasicEventingClient.exe

Basic eventing client

File Service

The file service sample demonstrates advanced client and device development, and illustrates simple control messaging, eventing, and attachments. The service is a Windows Embedded CE console application that starts listening on a specified endpoint and shares a local directory. The service generates events when files in the local directory that the endpoint is monitoring are changed, added, removed, or modified. The endpoint shuts down when the user presses any key. The client application is a Windows Embedded CE application that connects to a specified endpoint and uses a local directory to store files downloaded from the service.

The sample code can be found at the following locations.

Files Description

%_WINCEROOT%\public\servers\sdk\samples\wsd\FileService.exe

File Service

%_WINCEROOT%\public\servers\sdk\samples\wsd\FileClient.exe

File Client

See Also

Other Resources

Web Services on Devices