Geeks With Blogs
Kasi Srinivasan Microsoft Certified Technology Specialist
While consuming a WCF Service in BizTalk Server 2006 R2 using WCF adapter (WSHTTP binding), there is one thing that has to be kept in mind. By default, BizTalk expects response for every request goes out of the BizTalk server meaning two way communication except for  adapter like NetMSMQ.

So if the WCF service that you are consuming has contract which has been set to IsOneWay=true, when you consume this service BizTalk would throw error waiting for the response.

public interface IOrderService {

   [OperationContract(IsOneWay =true, ReplyAction="[PlaceOrder]")]        
       void PlaceOrder(ShipOrderMessage msgShipOrder);

}

Make sure to leave the IsOneWay to the default value of false.

public interface IOrderService {

   [OperationContract(IsOneWay =false, ReplyAction="[PlaceOrder]")]        
       void PlaceOrder(ShipOrderMessage msgShipOrder);

}

Excerpts from MSDN :

WCF client applications cannot use service contracts with one-way operations to send messages to your WCF receive locations. The operations on the client-side contract should be annotated with IsOneWay=false and ReplyAction=”*”. The only exception is when you’re using NetMsmqBinding, in which case all operations on the client contract should be one-way.

Posted on Monday, March 2, 2009 4:07 PM | Back to top


Comments on this post: Consuming WCF Service using BizTalk WCF Adapter

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © kasi | Powered by: GeeksWithBlogs.net