[Mono-dev] [PATCH] System.Web.Services: remove extra documentation item(s) from wsdl

Konstantin Triger kostat at mainsoft.com
Wed Feb 28 10:00:04 EST 2007


Hi Eno,

The fix works for me, but it's still not good:

if (o119 is XmlElement) {
if ((o119.LocalName == "documentation" && o119.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
}
else o119.WriteTo (Writer);
WriteElementLiteral (o119, "", "", false, true);
}else
throw CreateUnknownAnyElementException (o119.Name, o119.NamespaceURI);

So currently it will print twice if the LocalName != "documentation"...

What it should be is write once if LocalName && NamespaceURI are fine (can be several possibilities - for each XmlAnyElement) or throw.

Regards,
Konstantin Triger

> -----Original Message-----
> From: Atsushi Eno [mailto:atsushi at ximian.com]
> Sent: Wednesday, February 28, 2007 10:43 AM
> To: Konstantin Triger
> Cc: Mono Development List
> Subject: Re: [Mono-dev] [PATCH] System.Web.Services: remove extra
> documentation item(s) from wsdl
> 
> Hi Kosta,
> 
> Konstantin Triger wrote:
> > Hi Eno,
> >
> > Currently we output the documentation element twice, for example:
> > if ((o92.Name == "documentation" && o92.NamespaceURI ==
> "http://schemas.xmlsoap.org/wsdl/")) {
> > }
> > else o92.WriteTo (Writer);
> > WriteElementLiteral (o92, "", "", false, true);
> >
> > If the name is not 'documentation' (in our case it's
> 'wsdl:documentation'), the element is written by WriteTo and
> WriteElementLiteral.
> >
> > But if this is auto generated, we need to fix in the xml serialization
> generator code.
> 
> With your hint it was easy to fixed it (I think I fixed it :-)
> Can you please check if it works for you?
> 
> Atsushi Eno


More information about the Mono-devel-list mailing list