(or why my previous post doesn’t apply to all adapters)
In a previous post I identified how if you had the WCF-BasicHttp adapter on the backend send and the WCF-NetTcp adapter on the frontend receive you need a transformation for the client to interpret the backend Fault as a Fault since there is a SOAP version mismatch.
As was evident by a comment, this does not apply to all adapters, but only to the base WCF adapters. for example it does not work with the WCF-SQL adapter.
Why?
In contrast to the base WCF adapters, which when you enable the Propagate fault message treats a SOAP Fault coming from the recipient service as an acceptable message and returns it to the receive port as a valid SOAP Fault message that has Fault as the root element, the WCF-SQL adapter returns a NACK message (if there is an error raised in SQL) as the message. The NACK message has not got the Fault element as it’s root, but instead has Envelope, and looks like this:
<?xml version="1.0" encoding="utf-8"?> <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP:Body> <SOAP:Fault> <faultcode>Microsoft BizTalk Server Negative Acknowledgment </faultcode> <faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring> <faultactor>C:\Projects\Sample\Locations\Response\FM_%MessageID%.xml</faultactor> <detail> <ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"> <NAckID>{FFB1A60B-E593-4620-8897-4E9C7030A937}</NAckID> <ErrorCode>0xc0c01658</ErrorCode> <ErrorCategory>0</ErrorCategory> <ErrorDescription>There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "Failed Message" URI: "C:\Projects\Sample\Locations\Response\FM_%MessageID%.xml" Reason: This Assembler cannot retrieve a document specification using this type: "http://Sample#Unknown". </ErrorDescription> </ns0:NACK> </detail> </SOAP:Fault> </SOAP:Body> </SOAP:Envelope>
Therefore it cannot be mapped by the map presented in that post, although the Fault it contains is a SOAP 1.1 Fault.
Read more about ACK and NACK messages here.