Search code examples
biztalkwcf-lob-adapter

How to Perform a One-Way Send with a Custom WCF LOB Adapter


I'm trying to create a basic one-way custom WCF LOB Adapter for use with BizTalk and am implementing the Execute method that gets created by the Visual Studio WCF LOB Adapter SDK project Wizard.

The documentation for this method is summarized with the following comment, that appears right above the method :

   // Executes the request message on the target system and returns a response message.
   // If there isn’t a response, this method should return null

However, when returning null, an error is raised in BizTalk, with the following (roughly translated) message:

System.ServiceModel.CommunicationException: The server did not produce an appropriate response ; this may be due to non-matching contracts ; a premature end of the session or an internal error.

What gives ?


Solution

  • I haven't used the LOB adapter SDK, but the WCF adapter in BTS doesn't support one-way services very well. You're best bet might be to return an empty message (i.e. void, but not one way, in a regular service contract.)