In the BizTalk Server 2009 documentation for the topic How to Handle Typed Fault Contracts in Orchestrations, the documentation assumes the reader is calling a web service based on the SOAP 1.2 specification. The code sample presented will not work if the user is configuring a WCF Send Adapter to call a web service based on the SOAP 1.1 specification.

When the code sample is used as it is presented against a service based on the SOAP 1.1 specification, the user will most likely see an error like

System.InvalidOperationException: Unable to find match for inbound body path expression. The difference between the two SOAP specifications is in the capitalization of the detail node under the root Fault node. In order to correctly process both SOAP 1.1 and SOAP 1.2 Faults, the XPath statement in Step 8 of the documentation can be changed from

[local-name()='Fault']/*[local-name()='Detail']/* | /*[local-name()='ExpectedResponseMessageType']

to the following statement:

/*[local-name()='Fault']/*[local-name()='Detail' or local-name()='detail']/* | /*[local-name()='ExpectedResponseMessageType']

This adjustment enables us to look for a node name of ‘detail’ (SOAP 1.1) or a node name of ‘Detail’ (SOAP 1.2) under the ‘Fault’ node and parse the fault message for the body content that is contained in the SOAP fault.