Menu

AsyncWcfLib class diagram messages

asy proger

Classdiagram_messages.png

The application part of this class diagram (=data contract) is an example taken from AsyncWcfLib.Test2.

The upper part of this class diagram shows messages provided by AsyncWcfLib:

  • WcfMessage: The base class of all messages.
    Its properties identify the client that sent the message and the requestmessage that leads to the response.
    Other data members let the AsyncWcfLib check messageflow. Traces are written in case of error.

  • WcfIdleMessage: A default message containing no information.

  • WcfErrorMessage: The asynchronous equivalent to an exception.
    It contains the System.Exception objects that were thrown during message exchange.
    A errorcode enumeration identifies the point of failure (client, service, library, user...).

  • WcfPartner: This class is used as message and is kept as partner identification on client and service side.

When deploying applications, you are distributing library and message assemblies.
Version conflicts may occur during communication, when applications are not deployed at the same time on all hosts.
See [AsyncWcfLib package diagram] and [Implement messages using AsyncWcfLib] for further details.

The application designer must define message classes with great care in order not to break an existing data contract.
The following rules apply:

  • New or renamed message elements are not received by an old receiver.
    Test2.Messages.Test2Req shows a possibility to make enumeration fields version tolerant for an old receiver.

  • Not existing message elements are initialized with 0 when deserialized in a new receiver.
    When defining a metheod with attribut [OnDeserialized] you can override this default behaviour.
    See also in MSDN: Lax versioning http://msdn.microsoft.com/en-us/library/ms731060%28VS.100%29.aspx

Related

Wiki: AsyncWcfLib package diagram
Wiki: Concept of AsyncWcfLib
Wiki: Home
Wiki: Implement a client using AsyncWcfLib
Wiki: Implement messages using AsyncWcfLib
Wiki: Run AsyncWcfLib.Test1

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.