Getting Error in deserializing body of reply message for operation 'GetVersion'

I am trying to create the sample Data scope application mentioned in chapter 2 of the book below

https://customers.reuters.com/a/support/paz/pazDocs.aspx?did=481357

I am getting an error as below:

Unhandled Exception: System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'GetVersion'. ---> System.InvalidOperationException:
There is an error in XML document (1, 503).
at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
at System.Xml.XmlExceptionHelper.ThrowMaxNameTableCharCountExceeded(XmlDictionaryReader reader, Int32 maxNameTableCharCount)
at System.Xml.XmlBaseReader.QuotaNameTable.Add(Int32 charCount)
at System.Xml.XmlBaseReader.QuotaNameTable.Add(String value)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExtractionService.InitIDs()
at System.Xml.Serialization.XmlSerializationReader.Init(XmlReader r, XmlDeserializationEvents events, String encodingStyle, TempAssembly tempAssembly)
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, MessagePartDescription
--- End of inner exception stack trace ---

can you please help

Best Answer

  • @sree.harsha,

    Is your code the exact same code as the sample, or were any changes made ?

    Error ThrowMaxNameTableCharCountExceeded seems to indicate that a string was too long.

    A few pointers which might help you identify what is wrong:

    • Are you using a valid DSS username and password ?
    • Was the WSDL added to the project ? Was it updated ?
    • Try commenting out sections of the code to find out which one generates the error. Is it in section Get API version, Validate an Instrument, or Re-assign credentials variable ?

    As a side note: if you are at the start of a new development project, you should use the REST API. Both the SOAP and REST APIs are currently supported, but SOAP will be phased out. REST is the way to go.