[Mono-bugs] [Bug 75970][Nor] New - SOAP serializer does not correctly encode field names when a serialization surrogate is used

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 2 15:24:11 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 mono at kinitos.com.

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

--- shadow/75970	2005-09-02 15:24:11.000000000 -0400
+++ shadow/75970.tmp.15810	2005-09-02 15:24:11.000000000 -0400
@@ -0,0 +1,133 @@
+Bug#: 75970
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: mono at kinitos.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SOAP serializer does not correctly encode field names when a serialization surrogate is used
+
+Description of Problem:
+
+The SOAP serializer does not correctly encode field names when a
+serialization surrogate is used.  Characters that should be escaped (such
+as "+") are not, and this causes the deserialization to fail.  In short, it
+is possible for the serializer to serialize something that it can't
+deserialize.
+
+Steps to reproduce the problem:
+1. Run the attached program
+
+Actual Results:
+$ ./main.exe
+Serialized simpleSubClass =
+<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+xmlns:clr="http://schemas.microsoft.com/clr/"
+SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+  <SOAP-ENV:Body>
+    <a1:SimpleSubClass id="ref-1"
+xmlns:a1="http://schemas.microsoft.com/clr/assem/main%2C%20Version%3D0.0.0.0%2C%20Culture%3Dneutral">
+      <SimpleClass+_ID xsi:type="a2:Guid"
+xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
+        <_a>0</_a>
+        <_b>0</_b>
+        <_c>0</_c>
+        <_d>0</_d>
+        <_e>0</_e>
+        <_f>0</_f>
+        <_g>0</_g>
+        <_h>0</_h>
+        <_i>0</_i>
+        <_j>0</_j>
+        <_k>0</_k>
+      </SimpleClass+_ID>
+    </a1:SimpleSubClass>
+  </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+-------
+Deserialization failed with error:
+System.Xml.XmlException: expected '>' (3E) but found '+' (2B)  Line 4,
+position 20.
+in <0x00183> System.Xml.XmlTextReader:Expect (Int32 expected)
+in <0x0030c> System.Xml.XmlTextReader:ReadStartTag ()
+in <0x00181> System.Xml.XmlTextReader:ReadContent ()
+in <0x001bb> System.Xml.XmlTextReader:ReadContent ()
+in <0x00133> System.Xml.XmlTextReader:Read ()
+in <0x000af>
+System.Runtime.Serialization.Formatters.Soap.SoapReader:DeserializeISerializableObject
+(System.Object obj, Int64 id,
+System.Runtime.Serialization.SerializationInfo info, System.Boolean hasFixup)
+in <0x001ce>
+System.Runtime.Serialization.Formatters.Soap.SoapReader:DeserializeObject
+(System.Type type, Int64 id, Int64 parentId, System.Reflection.MemberInfo
+parentMemberInfo, System.Int32[] indices)
+in <0x00105>
+System.Runtime.Serialization.Formatters.Soap.SoapReader:Deserialize ()
+in <0x002ca>
+System.Runtime.Serialization.Formatters.Soap.SoapReader:Deserialize
+(System.IO.Stream inStream, ISoapMessage soapMessage)
+in <0x000aa>
+System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Deserialize
+(System.IO.Stream serializationStream,
+System.Runtime.Remoting.Messaging.HeaderHandler handler)
+in <0x00012>
+System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Deserialize
+(System.IO.Stream serializationStream)
+in <0x00048> ObjectSerializer:Deserialize (System.Byte[] bytes)
+in <0x0010c> ApplicationEntryPoint:Main (System.String[] args)
+
+
+Expected Results:
+C:\mono-test>main.exe
+Serialized simpleSubClass =
+<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0"
+SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+<SOAP-ENV:Body>
+<a1:SimpleSubClass id="ref-1"
+xmlns:a1="http://schemas.microsoft.com/clr/assem/main%2C%20Version%3D0.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
+<SimpleClass_x002B__ID xsi:type="a2:Guid"
+xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
+<_a>0</_a>
+<_b>0</_b>
+<_c>0</_c>
+<_d>0</_d>
+<_e>0</_e>
+<_f>0</_f>
+<_g>0</_g>
+<_h>0</_h>
+<_i>0</_i>
+<_j>0</_j>
+<_k>0</_k>
+</SimpleClass_x002B__ID>
+</a1:SimpleSubClass>
+</SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+-------
+Deserialized simpleClass =
+ID:    00000000-0000-0000-0000-000000000000
+
+-------
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+This was observed on mono-1.1.8.3, built from the source, on
+debian/unstable running a 2.6.9 kernel


More information about the mono-bugs mailing list