[Mono-dev] FW: Bug System.Web.Services

Konstantin Triger kostat at mainsoft.com
Sun Oct 8 10:07:34 EDT 2006


Hi Lluis,

Did you have a chance to think about this one?
The XmlSchema class can easily hold more than one definition for the same type (mono and .Net). So the filtering should be made at a higher level, the XmlSchemaExporter.ExportXXX look like a good candidate.

Regards,
Konstantin Triger

-----Original Message-----
From: Konstantin Triger 
Sent: Thursday, September 07, 2006 6:12 PM
To: 'lluis at ximian.com'
Cc: Vladimir Krasnov
Subject: FW: FW: [Mono-dev] Bug System.Web.Services

Hi Lluis,

We made an initial investigation:

The char type is a special case because it is a primitive and thus can be handled by Http protocol, but is not an xsd type and thus has a special entry in schema.

So the feeling is that every ExportXXX should perform the duplication test, but from the ServiceDescriptorReflector we hit only the char case.

This claim should be validated of course.

Regards,
Konstantin Triger

-----Original Message-----
From: Vladimir Krasnov 
Sent: Thursday, September 07, 2006 5:46 PM
To: Konstantin Triger
Subject: FW: FW: [Mono-dev] Bug System.Web.Services

 

-----Original Message-----
From: Lluis Sanchez [mailto:lluis at ximian.com] 
Sent: Thursday, September 07, 2006 4:35 PM
To: Vladimir Krasnov
Subject: Re: FW: [Mono-dev] Bug System.Web.Services

El jue, 07-09-2006 a las 03:49 -0700, Vladimir Krasnov escribió:
> Hi Lluis,
> 
> Can you please review this patch shortly because we are hurrying commint this due to upcoming release of GrassHopper.

If you are in real hurry, feel free to commit the patch since I don't think it can have any negative side effect. 

However, I still would like to know if the problem is really there or if there is something else wrong. It is not so urgent though.

Lluis.

-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Vladimir Krasnov
Sent: Wednesday, September 06, 2006 7:08 PM
To: mono-devel-list at lists.ximian.com
Cc: lluis at ximian.com
Subject: [Mono-dev] Bug System.Web.Services

Hello Lluis,

The is a bug in getting wsdl, if web service has a web method
with char parameter, it will be declared twice in the wsdl.

Please look at the attached patch that fixes the problem.

===================================================================
--- System.Xml.Serialization/XmlSchemaExporter.cs	(revision 65001)
+++ System.Xml.Serialization/XmlSchemaExporter.cs	(working copy)
@@ -643,6 +643,11 @@
 			SetMapExported (map);
 
 			XmlSchema schema = GetSchema (map.XmlTypeNamespace);
+			for (int i = 0; i < schema.Items.Count; i++) {
+				XmlSchemaSimpleType item = schema.Items [i] as XmlSchemaSimpleType;
+				if (item != null && item.Name == map.ElementName)
+					return;
+			}
 			XmlSchemaSimpleType stype = new XmlSchemaSimpleType ();
 			stype.Name = map.ElementName;
 			schema.Items.Add (stype);



More information about the Mono-devel-list mailing list