[Mono-list] patch SoapFault: GetObjectData & ctr for ISerializable imp.

Cesar Octavio López Nataren cesar@ciencias.unam.mx
Wed, 14 Aug 2002 00:21:05 -0500


This is a MIME-formatted message.  If you see this text it means that your
mail software cannot handle MIME-formatted messages.

--=_0_2875_1029302465
Content-Type: text/plain; format=flowed; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Best regards mono:: team! 

cesar
--=_0_2875_1029302465
Content-Disposition: attachment; filename="SoapFault.diff"
Content-Type: text/plain; charset="iso-8859-1"; name="SoapFault.diff"
Content-Transfer-Encoding: 7bit

Index: SoapFault.cs
===================================================================
RCS file: /mono/mcs/class/corlib/System.Runtime.Serialization.Formatters/SoapFault.cs,v
retrieving revision 1.1
diff -u -r1.1 SoapFault.cs
--- SoapFault.cs	29 Jul 2002 17:26:42 -0000	1.1
+++ SoapFault.cs	14 Aug 2002 05:18:10 -0000
@@ -25,6 +25,13 @@
 			throw new NotImplementedException ();
 		}
 
+		public SoapFault (SerializationInfo info, StreamingContext context)
+		{
+			FaultCode = info.GetString ("faultcode");
+			FaultString = info.GetString ("faultstring");
+			Detail = info.GetValue ("detail", typeof (object));
+		}
+
 		public SoapFault (string faultCode, string faultString,
 				  string faultActor, ServerFault serverFault)
 		{
@@ -58,7 +65,9 @@
 		public void GetObjectData (SerializationInfo info,
 					   StreamingContext context)
 		{
-			throw new NotImplementedException ();
+			info.AddValue ("faultcode", FaultCode, typeof (string));
+			info.AddValue ("faultstring", FaultString, typeof (string));
+			info.AddValue ("detail", Detail, typeof (object));
 		}
 	}
 }

--=_0_2875_1029302465
Content-Disposition: attachment; filename="SoapFault_serialization.xml"
Content-Type: text/plain; charset="iso-8859-1"; name="SoapFault_serialization.xml"
Content-Transfer-Encoding: quoted-printable

<SOAP-ENV:Envelope xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance=
" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC=3D"http:/=
/schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV=3D"http://schemas.xml=
soap.org/soap/envelope/" xmlns:clr=3D"http://schemas.microsoft.com/soap/e=
ncoding/clr/1.0" SOAP-ENV:encodingStyle=3D"http://schemas.xmlsoap.org/soa=
p/encoding/">=0D
<SOAP-ENV:Body>=0D
<SOAP-ENV:Fault id=3D"ref-1">=0D
<faultcode id=3D"ref-2">SOAP-ENV:</faultcode>=0D
<faultstring xsi:type=3D"xsd:anyType" xsi:null=3D"1"/>=0D
<detail xsi:type=3D"xsd:anyType" xsi:null=3D"1"/>=0D
</SOAP-ENV:Fault>=0D
</SOAP-ENV:Body>=0D
</SOAP-ENV:Envelope>=0D

--=_0_2875_1029302465--