[Mono-bugs] [Bug 75180][Nor] New - Serialization of enum's with '.'s in them fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jun 8 10:13:32 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gnome at flowerday.cx.

http://bugzilla.ximian.com/show_bug.cgi?id=75180

--- shadow/75180	2005-06-08 10:13:32.000000000 -0400
+++ shadow/75180.tmp.27699	2005-06-08 10:13:32.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 75180
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web.Services
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gnome at flowerday.cx               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Serialization of enum's with '.'s in them fails
+
+Description of Problem:
+
+In my web service, I have a type, whose schema is (like):
+
+
+<xsd:simpleType name="Pool.LoadBalancingAlgorithm">
+   <xsd:restriction base="xsd:string">
+     <xsd:enumeration value="foo">
+     </xsd:enumeration>
+     <xsd:enumeration value="bar">
+     </xsd:enumeration>
+   </xsd:restriction>
+</xsd:simpleType>
+
+
+The wsdl tool converts this into:
+
+[System.Xml.Serialization.SoapType("Pool.LoadBalancingAlgorithm",Namespace="urn:mynamespace")]
+public enum PoolLoadBalancingAlgorithm {
+    roundrobin,
+    wroundrobin,
+}
+
+One of my functions takes an array of these items, and mono fails to
+serialize the request correctly to XML. I get (in the XML):
+
+<q3:Array id="id2" xmlns:q4="urn:mynamespace"
+q3:arrayType="q4:Pool.LoadBalancingAlgorithm[2]"
+xmlns:q3="http://schemas.xmlsoap.org/soap/encoding/">
+
+<Item xsi:type="q4:PoolLoadBalancingAlgorithm">foo</Item>
+<Item xsi:type="q4:PoolLoadBalancingAlgorithm">bar</Item>
+</q3:Array>
+
+Note the fact that mono is claiming the type is
+'PoolLoadBalancingAlgorithm', not 'Pool.LoadBalancingAlgorithm'.
+
+
+This causes the SOAP server to complain about an unknown type.


More information about the mono-bugs mailing list