日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

WCF 第四章 綁定 msmqIntegrationBinding

系統(tǒng) 1923 0

msmqIntegrationBinding 綁定用來在一個(gè)WCF應(yīng)用程序和一個(gè)直接利用MSMQ的應(yīng)用程序間通信-比如,使用System.Messaging.這允許開發(fā)人員利用WCF同時(shí)也使用他們已有的MSMQ應(yīng)用程序。msmqIntegrationBinding綁定允許MSMQ消息映射到WCF消息。這通過在MsmqMessage類中對(duì)MSMQ消息包裝來實(shí)現(xiàn)的。類位于System.ServiceModel.MsmqIntegration命名空間里。實(shí)例可以使用單向契約被發(fā)送或接收。

?? 下面的代碼顯示了msmqIntegrationBinding綁定的地址格式:

?? msmq.formaname:{MSMQ format name}

?? MSMQ地址格式不需要端口來確定。然后,MSMQ需要打開特定端口,比如1801.表4.12顯示了msmqIntegrationBinding綁定的可以配置的屬性。

表4.12 msmqIntegrationBinding綁定屬性

WCF 第四章 綁定 msmqIntegrationBinding

? WCF 第四章 綁定 msmqIntegrationBinding

?列表4.30 顯示了使用msmqIntegrationBinding綁定暴露一個(gè)服務(wù)的最小配置

?列表4.30 msmqIntegrationBinding 宿主配置

      <?xml version="1.0" encoding="utf-8" ?>

<configuration> 

 <system.serviceModel>   

  <services>      

   <service name="EssentialWCF.StockQuoteRequestService">        

   <endpoint address="msmq.formatname:DIRECT=OS:.\private$\stockquoteresponse"            

          binding="msmqIntegrationBinding"            

          contract="EssentialWCF.IStockQuoteRequest" />      

   </service>    

  </services>  

</system.serviceModel></configuration>


    

調(diào)用由msmqIntegrationBinding綁定生成的服務(wù)的最小配置在列表4.31中顯示

???列表4.31 msmqIntegrationBinding 客戶端配置

      <?xml version="1.0" encoding="utf-8" ?>

<configuration>  

  <system.serviceModel>    

  <services>      

   <service name="EssentialWCF.HelloWorld">        

   <endpoint address="msmq.formatname:DIRECT=OS:.\private$\stockquoteresponse"            binding="msmqIntegrationBinding"            

   contract="EssentialWCF.IStockQuoteRequestService" />      

   </service>    

  </services>  

</system.serviceModel></configuration>


    

WCF 第四章 綁定 msmqIntegrationBinding


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 越西县| 尼玛县| 花莲县| 陇西县| 桦甸市| 理塘县| 朔州市| 安庆市| 仲巴县| 和硕县| 连江县| 商丘市| 静宁县| 梓潼县| 玉山县| 南京市| 克拉玛依市| 信宜市| 茂名市| 上犹县| 涿州市| 吉林省| 湘潭县| 古交市| 梓潼县| 陇西县| 济宁市| 岳普湖县| 新竹县| 当雄县| 施秉县| 潼关县| 盐津县| 南宁市| 东丽区| 佛冈县| 达州市| 沅江市| 方正县| 岳阳市| 平原县|