[Mono-dev] Re: Xml serialization: wrong enum name encoding

Lluis Sanchez lluis at ximian.com
Mon Feb 6 09:58:03 EST 2006


The patch looks ok to me. Thanks.

El dom, 05-02-2006 a las 10:06 -0800, Konstantin Triger escribió:
> Hi Lluis,
> 
>  
> 
> We wrongly encode enum names, what causes this WebMethod to fail to
> consume:
> 
>  
> 
> public enum MyEnum {
> 
>  
> 
>       ///<remarks/>
> 
>       [System.Xml.Serialization.XmlEnumAttribute("tns:ID")]
> 
>       tnsID,
> 
>  
> 
>       [System.Xml.Serialization.XmlEnumAttribute("xsd:base64Binary")]
> 
>       xsdbase64Binary,
> 
> }
> 
>  
> 
> [System.Web.Services.WebMethodAttribute()]
> 
> public MyEnum MyTest() {
> 
>       return MyEnum.tnsID;
> 
> }
> 
>  
> 
> Instead of expecting “tns:ID”, we expect
> XmlConvert.EncodeLocalName(“tns:ID”) and fail…
> 
>  
> 
> Please review the attached patch.
> 
>  
> 
> Regards,
> 
> Konstantin Triger
> 
>  
> 
> 




More information about the Mono-devel-list mailing list