Topic by Cristina Nistor
Content
Hi,
When I try to get Answer objects using the .Get() method and the Solution field has a big text (and by big I mean a few pages, about 40-50 kb, not close to 10MB which is the limit stated in the SOAP API documentation), I get the following error:
Error in deserializing body of reply message for operation 'Get'.
Exception: System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'Get'. ---> System.InvalidOperationException: There is an error in XML document (63, 57). ---> System.Xml.XmlException: The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 63, position 57.
at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
at System.Xml.XmlDictionaryReader.ReadString(Int32 maxStringContentLength)
at System.Xml.XmlDictionaryReader.ReadString()
at System.Xml.XmlReader.ReadElementString()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderRightNowSyncPort.Read133_Answer(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderRightNowSyncPort.Read142_RNObject(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderRightNowSyncPort.Read221_GetResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer22.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
I tried the same using QueryObjects, but I get the same error:
Error in deserializing body of reply message for operation 'QueryObjects'.
I am getting this even if I try to get a single Answer, without any other big data or attachments in it.
I have the followig settings in the binding:binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
binding.MessageEncoding = System.ServiceModel.WSMessageEncoding.Mtom; // Allow for sending file attachments
binding.MaxBufferSize = 10485760*22; // Set max buffer size to 10MB * 22 for large files
binding.MaxReceivedMessageSize = 10485760*22; // Set max buffer size to 10MB * 22 for large files
TimeSpan timeSpan = new TimeSpan(0, 3, 0);
binding.SendTimeout = timeSpan;
binding.ReceiveTimeout = timeSpan;
Also, the time SendTimeout setting is not taken into account, and I still get a timeout error after 60 secs.
Are there some limitations for Answers regarding Solution size or total size of data to be sent during Get, Create or Update? As I could not find anything in this regard in the documentation, except fot the max size of the Solution field being 10MB which is false, as the Get fails with far less.
Thanks,
Cristina