Note that there are some explanatory texts on larger screens.

plurals
  1. POBizTalk Generic WCF Http Receive Location for web services operations returning void
    text
    copied!<p>I'm trying to make a generic BizTalk receive location (WCF-WSHttp) that would <strong>accept any web service call for methods returning "void"</strong>. (The location is generic because BizTalk is forwarding the message to the real service implementation)</p> <p>I know that true one-way operations are not supported (except for WCF MSMQ), so the operation has [OperationContract(IsOneWay=false)]</p> <p>I'm able to call the generic service with a WCF client, and BizTalk correctly handles the message. However, BizTalk then returns a response that the client does not recognize, and the clients throws the following exception:</p> <blockquote> <p>System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'MyOperationName'. <strong>The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true).</strong></p> </blockquote> <p>This is an example of a response the client would recognize (tested by calling the service implementation directly, without BizTalk as an intermediary):</p> <pre><code>&lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"&gt; &lt;s:Header&gt; &lt;a:Action s:mustUnderstand="1"/&gt; &lt;a:RelatesTo&gt;urn:uuid:102509d6-15c6-4959-9a98-b714d5d16a1f&lt;/a:RelatesTo&gt; &lt;/s:Header&gt; &lt;s:Body&gt; &lt;MyOperationResponse xmlns="http://mynamespace"/&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>However, here is an example of the response BizTalk returns:</p> <pre><code> &lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"&gt; &lt;s:Header&gt; &lt;a:RelatesTo&gt;urn:uuid:9e794c0c-65f0-4807-b1f2-84a30587df9b&lt;/a:RelatesTo&gt; &lt;/s:Header&gt; &lt;s:Body/&gt; &lt;/s:Envelope&gt; </code></pre> <p>(I'm using a one-way receive location so I did not have to write any code to have this returned)</p> <p>This has two differences with the XML the client expects:</p> <ul> <li>No &lt;a:Action&gt;</li> <li>Empty &lt;s:Body&gt;</li> </ul> <p><strong>I see two ways to resolve that:</strong></p> <ol> <li>Modify the operation contract (C# interface) to expect an empty response/no action instead of what it currently expects. </li> <li>Configure BizTalk to return the XML the and the client expects</li> </ol> <p>Any ideas on how to obtain either solution 1 or solution 2?</p> <p>For solution 1, I tried playing with the [OperationContract(ReplyAction=...)] attribute but could not find a way to make that work.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload