How to fail a message when an exception is received by a WCF Solicit-Response port (PropagateFaultMessage=False)
I would like to route wcf service exceptions to the ESB Portal by failing the request message but it seems like I can't disable the WCF.PropagateFaultMessage property in the endpoint adapter configuration. WCF.PropagateFaultMessage is by default set to true and will cause the exception to be routed back to the caller instead of failing the message and triggering failed message routing to ESB.Portal.
I'm using the standard Messaging Extenders in this scenario together with the ItinerarySendPassthrough and ItinerarySendReceive pipelines for send and receive on my Dynamic Solicit-Response send port.
The itinerary consists of three steps: transform+transform+route (to wcf) and returning the wcf result to the caller if successful. The itinerary and services works perfectly unless an exception is thrown which causes the exception message to be returned to the caller. The ESB.ItineraryServices.Response.WCF service is being used as onramp.I've tried using the AdapterConfig property in the endpoint configuration and set PropagateFaultMessage=false with no luck, it does not show up in the message context when it's going through the send port (and the esb toolkit documentation is a bit fuzzy regarding what properties can be set and not via AdapterConfig)
Any hints on how to solve this?cheers
/Henrik
Answers
Hi
maybe not the solution to use when running ESB Toolkit and dynamic send ports.
However, the problem is solved, there are two "config" instances in the UDDI interface tModel for the ESB Toolkit:
1: microsoft-com:esb:runtimeresolution:endpointconfig
2: microsoft-com:esb:runtimeresolution:adapterconfig
I was using the adapterconfig instance which is wrong, setting the instance parameter value of the endpointconfig (1) to "PropagateFaultMessage=false" does the trick
If I have understood correctly the endpointconfig contains the transport type specific properties (for WCF in my case) and adapterconfig contains the common properties in the BTS-namespace such as RetryCount and RetryInterval, correct?
cheers
/Henrik- Marked As Answer byHenrik Sandqvist Wednesday, October 28, 2009 2:43 PM
All Replies
- Hi Henrik,
You should be able to set the PropagateFaultMessage property by using a xml config file of your WCF send port. Please refer to:
http://msdn.microsoft.com/en-us/library/bb226446(BTS.10).aspx
Thanks.
WenJun Zhang - MSFT Sincerely Microsoft Online Community Support "Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. "- Marked As Answer byWen-Jun ZhangMSFT, ModeratorWednesday, October 28, 2009 8:02 AM
- Unmarked As Answer byHenrik Sandqvist Wednesday, October 28, 2009 8:10 AM
- Marked As Answer byHenrik Sandqvist Wednesday, October 28, 2009 8:32 AM
- Unmarked As Answer byHenrik Sandqvist Wednesday, October 28, 2009 2:43 PM
Hi
maybe not the solution to use when running ESB Toolkit and dynamic send ports.
However, the problem is solved, there are two "config" instances in the UDDI interface tModel for the ESB Toolkit:
1: microsoft-com:esb:runtimeresolution:endpointconfig
2: microsoft-com:esb:runtimeresolution:adapterconfig
I was using the adapterconfig instance which is wrong, setting the instance parameter value of the endpointconfig (1) to "PropagateFaultMessage=false" does the trick
If I have understood correctly the endpointconfig contains the transport type specific properties (for WCF in my case) and adapterconfig contains the common properties in the BTS-namespace such as RetryCount and RetryInterval, correct?
cheers
/Henrik- Marked As Answer byHenrik Sandqvist Wednesday, October 28, 2009 2:43 PM

