Another ESB Toolkit Itinerary Gotcha: Be Sure to Correctly Set IsRequestResponse on Off-Ramp Extenders
If you use a two-way send as part of an itinerary, be sure to set the IsRequestResponse attribute of the Off-Ramp Extender to True.
This is one of those things that, when putting together an itinerary in a hurry, is easy to overlook. If, like me, you do at some point overlook this critical detail, you may end up seeing an exception such as this:
There was a failure executing the response(receive) pipeline: "Microsoft.Practices.ESB.Itinerary.Pipelines.ItineraryForwarderSendReceive, Microsoft.Practices.ESB.Itinerary.Pipelines, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "ESB Itinerary Cache" Send Port: "YOUR_SEND_PORT" URI: "http://YOUR_URI" Reason: Object reference not set to an instance of an object.
The ItineraryForwarderSendReceive pipeline component is expecting an output message, which, because IsRequestResponse was set to False, was not provided. Hence, we see the often cryptic “Object reference not set to an instance of an object” exception. Just set IsRequestResponse to True, and all should be well.