ASMX 2.0 - Basic Profile 1.0 Conformance - Part 2

less than 1 minute read

In my last post, I described how .NET 2.0 will check your web services for conformance to the Basic Profile (v1.0 in Beta 1 and v1.1 from Beta 2 onwards). When you create a web service client proxy using WSDL.EXE, the service is also checked for BP compliance. If I generate a proxy for my simple non-compliant web service then I get the following output:

C:>wsdl /o:simpleproxy.cs http://localhost/simple.asmx
Microsoft (R) Web Services Description Language Utility
[Microsoft(R) .NET Framework, Version 2.0.40607.85]
Copyright (C) Microsoft Corporation. All rights reserved.

Warning: This web reference does not conform to WS-I Basic Profile v1.0.
R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for
the use attribute in all soapbind:body, soapbind:fault, soapbind:header and
soapbind:headerfault elements.
- Operation 'Hello' on binding 'SimpleServiceSoap' from namespace 'urn:simple'.

Writing file 'simpleproxy.cs'.

C:>

The generated proxy will still work as normal to communicate with the web service if possible. The message is just a warning for your information, which you may communicate to the web service author. Clients generated with WSDL.EXE will always be BP compliant unless something appears in the service’s WSDL that prevents this (for example using SOAP encoding).

Updated: