Silverlight, SOAP Headers, WCF and asmx services

As reported by the Web Services Team, Silverlight 2 supports custom SOAP headers

A good working example can be found here, but it only uses WCF services, what about the “old” asmx ones?

I’ve modified the “SilverlightHeaders” solution to use both WCF and asmx, using OperationContext in the first case and HttpContext in the last, click here to download the complete solution.

WCF REST Starter Kit Preview 1 available on CodePlex

“The WCF REST Starter Kit is a set of features, Visual Studio templates, samples and guidance that enable users to create REST style services using WCF. The CodePlex Preview 1 release provides new features that enable or simplify various aspects of using the http capabilities in WCF, such as caching, security, error handling, help page support, conditional PUT, push style streaming, type based dispatch and semi-structured XML support. The WCF REST Starter Kit also provides Visual Studio templates for creating REST style services such as an Atom feed service, a REST-RPC hybrid service, Resource singleton and collection services and an Atom Publishing Protocol service. In addition, there are samples, documentation and other guidance that help to use these new capabilities.”

More information are available here.

New Web Services features in Silverlight 2 RTW

The Silverlight Web Services Team has posted a great article about the new features available in the RTW release.

The article gives details about:

  • SOAP Headers
  • SOAP Faults
  • Reusing existing types in “Add Service Reference”
  • Duplex Services
  • Support for ChannelFactory<T>

Faults and Exceptions when using Web Services in Silverlight 2

In this great post Eugene Osovetsky answers the following questions:

  • Why are exceptions not “propagated” from WCF services to Silverlight clients?
  • Why are SOAP Faults not supported?
  • Given the limitations on exceptions/faults, are there any tricks I can use to make my scenario work? Is anything planned to improve this in the future?
  • I can’t even get basic error handling to work when calling web services in Silverlight. Can I at least tell when something went wrong, even if I can’t access the exact fault details?