I have been struggling with setting up a workflow service that uses a msmqIntegrationBinding. The problem I have now is that I always get this serialization exception "System.ServiceModel.ProtocolException: An error was encountered while deserializing the message. The message cannot be received. ---> System.Runtime.Serialization.SerializationException: An error occurred while deserializing an MSMQ message's XML body. The message cannot be received. Ensure that the service contract is decorated with appropriate [ServiceKnownType] attributes or the TargetSerializationTypes property is set on the MsmqIntegrationBindingElement."
As far as I have understood is that the serialization helper cannot find any types to serialize the message to even though I am using the generic type MsmqMessage<MyMessageType> both in the service contract and in the workflow.
MyMessageType is generated from an .xsd with xsd.exe.
UPDATE: PROBLEM SOLVED I did all settings for WCF (Action, ServiceKnownType...) on the contract (interface) instead of doing it in the workflow. When I moved it to the workflow everything started to work!!