Share via


How to: Use a Proxy Generated by Wsdl.exe 

The .NET Compact Framework does not support all of the code generated by the Web Services Description Language Tool (Wsdl.exe). However, applications using Web services can use the generated proxy when you add a Web reference to a Smart Device project in Microsoft Visual Studio 2005.

There are situations when you might need to use Wsdl.exe. One case is when you need to provide the order of particle members in your proxy to conform with the order required by a Web service. The Wsdl.exe tool has the /order option that generates explicit order identifiers on particle members.

This example shows which code to remove from the generated proxy so it can be used by the .NET Compact Framework. The code to remove is described in the order that it appears in the generated proxy.

To remove unsupported code from the generated proxy

  1. Generate the proxy with the Web Services Description Language Tool (Wsdl.exe).

  2. Remove code that defines a delegate named the RetBaseTypesOperationCompleted of type SendOrPostCallback.

  3. Remove code that defines and references the RetBaseTypesCompleted event, the RetBaseTypesCompletedEventHandler delegate, and the RetBaseTypesCompletedEventArgs class.

  4. Remove code that defines and calls the RetBaseTypesAsync method.

  5. Remove code that defines and calls the OnRetBaseTypesOperationCompleted method.

  6. Remove code that defines and calls the CancelAsync method.

  7. Remove the Serializable attribute.

See Also

Concepts

Network Programming in the .NET Compact Framework
.NET Compact Framework How-To Topics