Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspxIntroduction The contents of the following post are taken from a presentation I created and delivered at TechReady 9 in July 2009 and replicated with Stephen Kaufman at Tech-Ed Europe 2009 . The ABC of WCF Windows Communication Foundation (WCF) is a runtimeen-USTelligent Evolution Platform Developer Build (Build: 5.6.50428.7875)re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10563891Fri, 10 Oct 2014 13:20:51 GMT91d46819-8472-40ad-a661-2c78acb4018c:10563891Paolo Salvatori<p>Hi Vanger</p>
<p>for a sample of a custom channel look at my sample: <a rel="nofollow" target="_new" href="http://blogs.msdn.com/b/paolos/archive/2010/01/14/how-to-create-a-custom-wcf-channel-that-debatches-an-inbound-message.aspx">blogs.msdn.com/.../how-to-create-a-custom-wcf-channel-that-debatches-an-inbound-message.aspx</a></p>
<p>Ciao</p>
<p>Paolo</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10563891" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10563848Fri, 10 Oct 2014 09:46:13 GMT91d46819-8472-40ad-a661-2c78acb4018c:10563848Venger<p>Sorry my mystake Paolo, about your name!. I am very out of mind !!</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10563848" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10563847Fri, 10 Oct 2014 09:41:05 GMT91d46819-8472-40ad-a661-2c78acb4018c:10563847Venger<p>Hello Paola, thx for the quick response. I have tried to use the encrypt/decrypt of the security level but the thing that i found is wcf always sign the message and i dont know how to specified the payload of the message. With WCF Custom and WCF Basi the message is tottally encrypted but in other format that the client wont required.</p>
<p>Do you have any example of custom channel or custom encoder?</p>
<p>Thanks.</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10563847" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10563828Fri, 10 Oct 2014 08:31:10 GMT91d46819-8472-40ad-a661-2c78acb4018c:10563828Paolo Salvatori<p>Hi Venger</p>
<p>Have you tried to use message level security to encrypt/decrypt only a section of the document? By the way, I think that if you want to encrypt the payload, you simply use a message inspector, if you instead want to encrypt/decrypt the whola SOAP message using a custom encoder/decoder, well, you should definitely create a custom channel.</p>
<p>Ciao</p>
<p>Paolo</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10563828" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10563826Fri, 10 Oct 2014 08:25:15 GMT91d46819-8472-40ad-a661-2c78acb4018c:10563826Venger<p>Hello excellent post, but i got a question how is the implementation tu use &nbsp;a custom encoder ( i want to ecnrypt/decrypt a piece of the body) in a custom binding. If you have other idea will be appreciated it!. I am very lost. I used message inspector but i read about the last stage of wcf is the encoder. </p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10563826" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10084081Mon, 01 Nov 2010 15:44:57 GMT91d46819-8472-40ad-a661-2c78acb4018c:10084081Diego Martínez<p>Thanks for your time Paolo!</p>
<p>In my opinion, this (creating two web services to manage two operations) is a big restriction. For each similar requirement (mixed operations) the web services inventory will grow considerably. I hope that the WCF Adapter architect could find a solution to this in a future adapter version.</p>
<p>I already read your excellent article about the IOneWayAsync issue.</p>
<p>Thanks again!,</p>
<p>Diego</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10084081" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10083904Mon, 01 Nov 2010 08:29:21 GMT91d46819-8472-40ad-a661-2c78acb4018c:10083904Paolo Salvatori<p>Hi Diego,</p>
<p>that&#39;s allright, no worries. I tried to follow the steps you mentioned, and I used the BizTalk WCF Service Publishing Wizard to create a Receive Location with a Two-Way operation and a One-Way operation respectively. Then I looked at the artifacts generated by the Wizard, and indeed the latter created a single Request-Response Receive Port and a Request-Response WCF-BasicHttp Receive Location. Then I opened the WSDL of the generated service and indeed the service exposes 2 operations, both using the BasicHttpBinding_ITwoWayAsync service contract, which is not what you were expecting.</p>
<p>I&#39;m afraid that in order to accomplish your objective, you have to create 2 separate Request Ports and 2 related Receive Locations, two-way and one-way respectively.</p>
<p>Note: beware that the service contract exposed by a One-way WCF-BasicHttp Receive Location is not the IOneWayAsync, as you could expect, but the ITwoWayAsyncVoid (see my article above). In other words, the operation exposed is not truly one-way, is just a two-way operationb with a void response. This deisgn was intentional, because one-way opeartions do not return any feedback or exception to the caller, and the architect that designed the WCF Adapter wanted to avoid this situation. The only Adapter using the IOneWayAsync and IOneWayAsyncTxn service contracts is the WCF-NetMsmq Adapter.</p>
<p>Ciao,</p>
<p>Paolo</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10083904" width="1" height="1">re: Customizing and Extending the BizTalk WCF Adaptershttp://blogs.msdn.com/b/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx#10083299Fri, 29 Oct 2010 22:05:51 GMT91d46819-8472-40ad-a661-2c78acb4018c:10083299Diego Martinez<p>Hi Paolo! I wanted to expose an WCF Service (basicHTTPBinding) in BizTalk with two operations: one operation is Request-Response (Sync) and the other is OneWay (Async). The WCF Publishing Wizard accepts this configuration (a service with one operation async and the other operation sync) but it only creates a Receive Location related to a TwoWay Receive Port.</p>
<p>So my question is how to manage correctly the Async operation within the TwoWay Receive Port/Location created (a TwoWay Receive Location always wait for a response).</p>
<p>The only solution is to create two WCF Services? One with the OneWay operation and other with the TwoWay operation? I hope not.</p>
<p>Sorry if this question is not related directly to this blog entry but I couldn´t find a blog entry better to ask for your recomendation regarding this issue.</p>
<p>Regards,</p>
<p>Diego</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10083299" width="1" height="1">