Archive for June, 2011

Issue: Received unexpected message type ‘’ does not match expected type ‘http://abhijit/WCF/06/2011#Operation1’

June 16, 2011 1 comment

Generally we encounter this issue when we try to consume a WCF Service with Custom Fault Contract from BizTalk. To circumvent this issue, check the WCF-Transport configuration settings of the Send port.

Select the xPath option under the inbound BizTalk message body and set the Body path expression to /*[local-name()=’Fault’]/*[local-name()=’detail’]/* | /*[local-name()=’Operation1Response’] | /*[local-name()=’Operation2Response’]

In the above xPath expression, I have used the union operation for multiple responses. So, if BizTalk receives the fault message then the Custom Fault will be extracted from /Fault/Detail path and when there is no fault then the successful response message will be forwarded to the orchestration.

Categories: BizTalk, WCF