[Mono-dev] [Mono-Dev] [Patch] System.Web.Services: ensure conformant WebSevice fails to generate its wsdl

Atsushi Eno atsushi at ximian.com
Wed Jan 31 01:31:45 EST 2007


Hi Kosta,

Thanks for the patch !

> The attached patch ensures that a webservice attributed with 
> [WebServiceBinding (ConformsTo = WsiProfiles.BasicProfile1_1)] throws in 
> case it does not conform to that profile.

I guess the purpose of this patch is not only about it. After this
patch it rejects WebService classes that do not have
WebServiceBindingAttribute. Is it correct?

If yes, then the BindingInfo changes make it nicer.
In that case we could simply reuse the attribute for Name,
Namespace and Location too (i.e. no need to have those fields anymore).

> +#if NET_2_0
> +                       if (binfo.WebServiceBindingAttribute != null && binfo.We
> bServiceBindingAttribute.ConformsTo != WsiProfiles.None && String.IsNullOrEmpty
> (binfo.WebServiceBindingAttribute.Name)) {
> +                               BasicProfileViolationCollection violations = new
>  BasicProfileViolationCollection ();
> +                               if (!WebServicesInteroperability.CheckConformanc
> e (binfo.WebServiceBindingAttribute.ConformsTo, desc, violations))
> +                                       throw new InvalidOperationException (vio
> lations [0].ToString ());
> +                       }
> +#endif

Do we need to check WebServiceBindingAttribute.Name here?

Atsushi Eno



More information about the Mono-devel-list mailing list