跟着Artech学习WCF扩展(2) 自定义Channel与执行的顺序
源代碼下載地址:點我
原文地址:http://www.cnblogs.com/artech/archive/2008/07/09/1238626.html
這節不看源碼 看著真費勁哈
?
服務器端是這樣的順序
MyBindingElement.BuildChannelListener()
MyChannelListener<TChannel>.OnOpen()
MyChannelListener<TChannel>.OnAcceptChannel()
MyReplyChannel.OnOpen()
MyReplyChannel.ReceiveRequest()
Receive a request message:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://ww
w.w3.org/2005/08/addressing">
? <s:Header>
??? <a:Action s:mustUnderstand="1">http://artech.messagingviabinding</a:Action>
??? <a:To s:mustUnderstand="1">http://127.0.0.1:8888/messagingviabinding</a:To>
? </s:Header>
? <s:Body>
??? <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">This is
a mannualy created reply message for the purpose of testing</string>
? </s:Body>
</s:Envelope>
MyReplyChannel.OnClose()
MyChannelListener<TChannel>.OnAcceptChannel()
客戶端是這樣的順序
MyBindingElement.BuildChannelFactory()
MyChannelFactory<TChannel>.OnOpen()
MyChannelFactory<TChannel>.OnCreateChannel()
MyRequestChannel.OnOpen()
MyRequestChannel.Request()
Receive a reply message:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://ww
w.w3.org/2005/08/addressing">
? <s:Header>
??? <a:Action s:mustUnderstand="1">http://artech.messagingviabinding</a:Action>
? </s:Header>
? <s:Body>
??? <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">This is
a mannualy created reply message for the purpose of testing</string>
? </s:Body>
</s:Envelope>
MyRequestChannel.OnClose()
總結
以上是生活随笔為你收集整理的跟着Artech学习WCF扩展(2) 自定义Channel与执行的顺序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 批处理for中如何实现break
- 下一篇: json2.js的初步学习与了解(转)