11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 8 ■ IMPLEMENTING RELIABLE MESSAGING AND QUEUE-BASED COMMUNICATIONS 271ramrameshreddy.blog.comYou will now look at how you can integrate your WCF application to a legacy applicationusing the MSMQ integration channel. Here are the steps (assuming you already have themessage-receiving service up and running).First, create an interface that defines the service contract for the WCF service that willsend queued messages to the MSMQ receiver, as shown in Listing 8-10.Listing 8-10. MSMQ Receiver Interface[ServiceContract]interface ITradeService{[OperationContract(IsOneWay = true)]void SubmitPurchaseOrder(MsmqMessage msg);}Second, create the configuration that specifies the use of the IntegrationBinding binding,as shown in Listing 8-11.Listing 8-11. IntegrationBinding ConfigurationramrameshreddyramrameshreddyYou can now perform a buy or a sell in a transacted manner using MSMQ. And that is it. Itis quite easy to integrate an MSMQ application with a WCF application. Now that you haveaccomplished this, you’ll see how you can integrate an MSMQ client with a WCF application.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!