ASMX 2.0 – Now with Basic Profile 1.1 Conformance

A few weeks ago, I wrote about the

Basic Profile support in ASP.NET Web Services
(ASMX) with .NET
2.0. Since then, Beta 2 has been released changing the details
slightly.

Beta 2 incorporates support for the
Basic
Profile v1.1
(Beta 1 supported v1.0). The syntax for declaring
that your web service conforms to BP1.1 has changed slightly
(different property and enum names).

<%@ WebService Language="C#" Class="SimpleService" %>

using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace="urn:simple")]
[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1,EmitConformanceClaims=true)]
public class SimpleService {

        [WebMethod]
        public string Hello(string s) {
                return string.Format("Hello, {0}!",s);
        }

}

The EmitConformanceClaims property now causes the following
claim to be included in the WSDL:

<wsdl:documentation>
<wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.1" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" />
</wsdl:documentation>

According to the WS-I site,
"The Basic Profile 1.1 is derived from the Basic Profile 1.0 by
incorporating to-date errata and removing to the Simple SOAP
Binding Profile those requirements related to the serialization of
envelopes and their representation in messages."