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

Atsushi Eno atsushi at ximian.com
Thu Feb 1 03:41:36 EST 2007


Oh, okay. Now all changes make sense to me. Please commit the patch.
Thanks :-)

Atsushi Eno

Konstantin Triger wrote:
> Hello Atsushi,
> 
> No, this is not correct. If there is no WebServiceBindingAttribute I add 
> a "default" BindingInfo. I refactored the BindingInfo construction 
> because currently we always create a default BindingInfo, which is not 
> conformant. Thus my validation never works.
> 
> The reason I check the WebServiceBindingAttribute.Name is because of MS 
> behavior. They throw ONLY if the name is unspecified (bug?), but in WSDL 
> it always gets a default value. This is also the reason I need the 
> original WebServiceBindingAttribute, since BindingInfo'a Name should be 
> always valid...
> 
> Regards,
> Kosta
> 
> 
> 
> -----Original Message-----
> From: Atsushi Eno [mailto:atsushi at ximian.com]
> Sent: Wed 31/01/2007 08:31
> To: Konstantin Triger
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-Dev] [Patch] System.Web.Services: ensure conformant 
> WebSevice fails to generate its wsdl
> 
> 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