[Mono-bugs] [Bug 391784] New: Return values of WCF methods cannot be a list with two identical objects
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat May 17 13:26:30 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=391784
Summary: Return values of WCF methods cannot be a list with two
identical objects
Product: Mono: Class Libraries
Version: SVN
Platform: i686
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: WCF
AssignedTo: atsushi at ximian.com
ReportedBy: schmmd at cs.washington.edu
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=216198)
--> (https://bugzilla.novell.com/attachment.cgi?id=216198)
The source code to repeat the example.
Arrays (and I believe lists as well) have problems when they contain two
identical objects. In the attached example, the return value cannot be
serialized by mono. There is also a (slightly different) error when the list
contains two Object values. Following is the exception this sample with give.
There is no exception with .Net 3.0.
bash-3.2# mono WCFTest.exe
Starting the server... [press enter to exit]
Starting the client... [press enter to exit]
Method run...
System.Runtime.Serialization.SerializationException: Circular reference of an
object in the object graph was found: '00:00:00' of type System.TimeSpan
at System.Runtime.Serialization.XmlFormatterSerializer.SerializeNonPrimitive
(System.Type type, System.Object graph) [0x00000]
at System.Runtime.Serialization.XmlFormatterSerializer.Serialize (System.Type
type, System.Object graph) [0x00000]
at System.Runtime.Serialization.CollectionTypeMap.Serialize (System.Object
graph, System.Runtime.Serialization.XmlFormatterSerializer serializer)
[0x00000]
at System.Runtime.Serialization.XmlFormatterSerializer.SerializeNonPrimitive
(System.Type type, System.Object graph) [0x00000]
at System.Runtime.Serialization.XmlFormatterSerializer.Serialize (System.Type
type, System.Object graph) [0x00000]
at System.Runtime.Serialization.XmlFormatterSerializer.Serialize
(System.Xml.XmlDictionaryWriter writer, System.Object graph,
System.Runtime.Serialization.KnownTypeCollection types, Boolean ignoreUnknown,
Int32 maxItems, System.String root_ns) [0x00000]
at System.Runtime.Serialization.DataContractSerializer.WriteObjectContent
(System.Xml.XmlDictionaryWriter writer, System.Object graph) [0x00000]
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject
(System.Xml.XmlDictionaryWriter writer, System.Object graph) [0x00000]
at
System.ServiceModel.Dispatcher.DataContractMessagesFormatter+DataContractBodyWriter.WriteMessagePart
(System.Xml.XmlDictionaryWriter writer,
System.ServiceModel.Description.MessageBodyDescription desc,
System.ServiceModel.Description.MessagePartDescription partDesc, System.Object
obj) [0x00000]
at
System.ServiceModel.Dispatcher.DataContractMessagesFormatter+DataContractBodyWriter.OnWriteBodyContents
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.BodyWriter.WriteBodyContents
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.SimpleMessage.OnWriteBodyContents
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.Message.WriteBodyContents
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.Message.WriteBody
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.Message.OnWriteMessage
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.Message.WriteMessage
(System.Xml.XmlDictionaryWriter writer) [0x00000]
at System.ServiceModel.Channels.TextMessageEncoder.WriteMessage
(System.ServiceModel.Channels.Message message, System.IO.Stream stream)
[0x00000]
at System.ServiceModel.Channels.HttpRequestContext.ProcessReply
(System.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x00000]
at System.ServiceModel.Channels.HttpRequestContext.Reply
(System.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x00000]
at System.ServiceModel.Dispatcher.DispatchOperation.HandleInvokeResult
(System.ServiceModel.Channels.RequestContext rc,
System.ServiceModel.OperationContext octx, TimeSpan sendTimeout,
System.Object[] outputs, System.Object result, System.Object[]
ctx_initialization_results) [0x00000]
at System.ServiceModel.Dispatcher.DispatchOperation.DoProcessRequest
(System.ServiceModel.Channels.RequestContext rc,
System.ServiceModel.OperationContext octx, TimeSpan sendTimeout) [0x00000]
at System.ServiceModel.Dispatcher.DispatchOperation.ProcessRequest
(System.ServiceModel.Channels.RequestContext rc,
System.ServiceModel.OperationContext octx, TimeSpan sendTimeout) [0x00000]
Unhandled Exception: System.Runtime.Serialization.SerializationException:
Expecting element 'ExceptionDetail' from namespace
'http://schemas.datacontract.org/2004/07/System.ServiceModel'. Encountered
'Element' with name 'detail', namespace ''
at System.Runtime.Serialization.XmlFormatterDeserializer.Verify
(System.Runtime.Serialization.KnownTypeCollection knownTypes, System.Type type,
System.String name, System.String Namespace, System.Xml.XmlReader reader)
[0x00000]
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Xml.XmlReader reader, System.Type type,
System.Runtime.Serialization.KnownTypeCollection knownTypes,
IDataContractSurrogate surrogate, System.String name, System.String Namespace,
Boolean verifyObjectName) [0x00000]
at System.Runtime.Serialization.DataContractSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader, Boolean verifyObjectName) [0x00000]
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader) [0x00000]
at System.ServiceModel.Channels.MessageFault.CreateFault11
(System.ServiceModel.Channels.Message message, Int32 maxBufferSize) [0x00000]
at System.ServiceModel.Channels.MessageFault.CreateFault
(System.ServiceModel.Channels.Message message, Int32 maxBufferSize) [0x00000]
at System.ServiceModel.ClientRuntimeChannel.Request
(System.ServiceModel.Description.OperationDescription od, System.Object[]
parameters) [0x00000]
at System.ServiceModel.ClientRuntimeChannel.Process
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000]
at __clientproxy_Contract.method () [0x00000]
at ConfigurationSectionOverWCFTest.Program.Main (System.String[] args)
[0x00000]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list