none
Custom Message Encoding - How to get reference to contract? RRS feed

  • Question

  • Hey there!

    I'm into development of a CsvBinding, including my own CsvChannel, CsvTransport and CsvMessageEncoder. This means, you can connect to the Endpoint with an ordinary Socket / TcpClient, and communicate via CSV encoded messages. So far, the TCP connection is working well, and I'm parsing CSV records and calling CsvMessageEncoder.ReadMessage(string) in order to convert the record into a SOAP message.

    The problem: My CsvMessageEncoder needs to know about the contract. And I haven't found out how to get a reference. I tried to use GetProperty<T>() and inspect the BindingContext, but I have no clue how to get hold of the contract. And without the contract, I don't know how to deserialize the CSV records.

    Any ideas?

    Thanks alot and regards,

    Frank
    Tuesday, May 26, 2009 7:50 PM

Answers

  • -> Any ideas?

    Message encoder is not used to serialize and deserialize things, please trying deriving from System.Runtime.Serialization.XmlObjectSerializer class instead to implement your own serialization and deserialization logic, and use the built-in message encoder instead.

    Hope this clears things up a little bit.

    Another Paradigm Shift
    http://shevaspace.blogspot.com
    • Marked as answer by Marco Zhou Wednesday, June 3, 2009 9:17 AM
    Monday, June 1, 2009 2:32 AM