èXµÔ¡@¡@»H¡@ WS-Policy Ïï¡@¡@ÆBÏï¡@Öv¡@¡@¡@ Web ¡@¥z¡@¡@¨{¡@¡@¡@£V»Ô¡@¡@¡@³æ¡@¡@¡@ðE¡@£n©Ó¡@¡@¡@¡@ÏÄ¡@¿ë´U¡@¡@¡@¡@·ø¡@£V¡@³õ¡@¡@¡@¡@WSE 2.0 ¡@¡@¡@¡@¥_¡@ Web ¡@¥z¡@¡@¡@¡@¡@¡@¡@£~¡@¡@¡@¡@¡@¡@ºN¡@¡@¡@¡@¥_¡@¬Ñ¾X£O¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¨{¡@¡@¡@¡@¡@¡~¡@¡g£K¡@¡@¡@¡@
¡@¡@èXµÔ¡@¡@©·¡@ Web ¡@¥z¾X£O¡@¡@¡@µÜ£~¡@ Kerberos ¡@¡@¬Ñ¡@¡@¡@çjªÄ¡o´U¡@¡@
¡@?xml version="1.0" encoding="utf-8"?¡@
¡@policyDocument
xmlns="http://schemas.microsoft.com/wse/2003/06/Policy"¡@
¡@mappings
xmlns:wse="http://schemas.microsoft.com/wse/2003/06/Policy"¡@
¡@mapDefault
policy="#policy-5903e02b-9c11-4dc5-8ca0-42d4e9d0bcde" /¡@
¡@/mappings¡@
¡@policies
xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"¡@
¡@wsp:Policy
wsu:Id="policy-5903e02b-9c11-4dc5-8ca0-42d4e9d0bcde"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"¡@
¡@wsse:Integrity wsp:Usage="wsp:Required"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"¡@
¡@wsse:TokenInfo¡@
¡@SecurityToken
xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext"¡@
¡@wsse:TokenType¡@wsse:Kerberosv5ST¡@/wsse:TokenType¡@
¡@/SecurityToken¡@
¡@/wsse:TokenInfo¡@
¡@wsse:MessageParts
Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part"¡@
wsp:Body()
¡@/wsse:MessageParts¡@
¡@/wsse:Integrity¡@
¡@/wsp:Policy¡@
¡@/policies¡@
¡@/policyDocument¡@
policyDocument ¡@¡@¡@£V£³¡@¡@¡@¡@¡@mappings ¢Q policies¡@policies ¡@¡@¡@£V¡@¡@¡@¡@¡@¡@¡@¡@¡~ðE¡@´É¡@ Policy ¡@¡@¡@¡@¡@££¡@¡@èXµÔ¡@¡@¡@¡@ Integrity ðE¡@¡@¡@¡@ÆB¡@¡@´fðEp¡@´U¡@¡@TokenInfo ¡@¡@¡@¡@»Ô¡@¡@´f¡@¡@¾PºN¡@á¡@¡@¡@¡@££¡@¡@ Kerberos ¡@¡@¡@µ{¡@¡@¡@¡@¡@¡~¡@Ñ¡@ðE¡@¡@¡@¡@¤æ´U¡@¡@¡@¦³õ¡@¡@¡@¡@¡@¡@Öv£~¡@ MessageParts ¡@¡@¡@¡@¡@¡@
policyDocument ¡@ mappings ³õ¡@«×¡@¡@¡~·É¾×íå¡@ policies ³õ¡@¡@¡@èXµÔ»ÔÖõ¡@¡@¡@££¡@¡@¡@¡@¡~·É¾×íå¡@¡@¡@ÖyÏÙ¡@«×¡@¡@¦ä¡@¡@¡@ÓIÖyÏÙ¡@
®J¡@Àt®¬©Ó¡@èXµÔ¡@¡@¡@¡@¡@Á{´fðEµ\ WSE ¡@¡@¡@¡@ÖËÆBèXµÔ¡@¡@¡@¡@¡@¡@¡@£V¡@ðE¡@¡@ Web ¡@¥z¡@£~¡@©Ó¡@¡@èXµÔ¡@¡@¡@¡@¡@¡@´fðE¡@¡@ Web.config ¡@¡@¡@¡@¡@¡@ Web.config ¡@¡@Ë¡@¡@¡@¹ô¡@ WSE SoapExtension¡@¹ô¡@ WSE ¡@¡@³õ¡@¡@¡@¡@í~¡@¡@¡@¡@¡@¡@¾X£OèXµÔÚì¡@£n¡@¡@¡@¡@¡@
¡@?xml version="1.0" encoding="utf-8"?¡@
¡@configuration¡@
¡@configSections¡@
¡@!-- ¡@¡@¬Ñ¡@¡@³õ¡@¡@¡@¡@¡@ ¥s¡@ºØ¡@
ºN¡@¡@¼KðE¶Ç¡o¡@ôm¡@ãc§Ë¡@¡@¡@¡@µÜ¡@¡@
¶Ç¡o¤~¡@--¡@
¡@section name="microsoft.web.services"
type="Microsoft.Web.Services.Configuration
.WebServicesConfiguration, Microsoft.Web.Services,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" /¡@
¡@/configSections¡@
¡@system.web¡@
¡@!-- ¡@¡@¸¸µ}¡@¡@®J£µ¡@¡@¡@ --¡@
¡@webServices¡@
¡@soapExtensionTypes¡@
¡@!-- ¡@¡@ WSE SoapExtension¡@¥s¡@ºØ¡@
ºN¡@¡@¼KðE¶Ç¡o¡@ôm¡@ãc§Ë¡@¡@
¡@µÜ¡@¡@¶Ç¡o¤~¡@--¡@
¡@add type="Microsoft.Web.Services
.WebServicesExtension, Microsoft.Web.Services,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
priority="1" group="0" /¡@
¡@/soapExtensionTypes¡@
¡@/webServices¡@
¡@/system.web¡@
¡@!-- WSE Configuration Section --¡@
¡@microsoft.web.services¡@
¡@policy¡@
¡@receive¡@
¡@cache name="policyCache.xml" /¡@
¡@/receive¡@
¡@/policy¡@
¡@/microsoft.web.services¡@
¡@/configuration¡@
¡@¡@¡@¡@¡@ Web ¡@¥z¡@¡@£K¡@¾X¡@¤~¡@ policyCache.xml ¡@¡@¡@èXµÔðE¡@¡@¥s¡@¡@
¡@ÏÄ´fðEµ\«ëí~¡@¡@¡@¡~¡@ Web ¡@¥z¡@¡@èXµÔ¡@¡@¡@¡@§²¡@¿ë¬Ñ£~¡@ Web ¡@¥z¡@µÜ¡@¡@¡@ªÄ¡oºN¡@¡@¡@¡@ò¼£n¡@¡@¡@¡@ÏÄ«ëí~¡@¡@¡@èXµÔ¡@¡@¡@¡@¤æ¡@¡@¡@£K£~¡@¡@µÜ¡@¡@¡@¡@ªµ¡@¡é£V¡@¡@Àtí}¡@¡@¡@¡@ðE¡@¡@¡@´f¡@¡@¡@£K Web ¡@¥z¡@¡@¡@¡@
ðE¡@£~¡@¡@µÜ¡@¡@¡@¡@¡@ÆB¡@¡@£¤¬é¡@¤~¡@¡@¡~èXµÔ¡@¡@¡@¡@´fðE¡@¡@£´£VÆB¡@¡@¡@¡@£~¡@¡@èXµÔ¡@¡@¡@¬Ñ¡@ðEÖÅ¡@ .asmx Web ¡@¥z¡@ Rock Paper Scissors ¬Ñ³æµÜ¡@¡@¡@¡@¡@¡@¡@Öv¡@ policyCache.xml ¡@¡@¡@¡@¡@ÆB¡@½S¡o¡@¡@¡@¡@¡@¡@»í¡@¡@¡@¬Ñ Web ¡@¥z¡@¡@í~¡@¡@ÆBµÜ¡@¡@¡@¡@¡@£K£~¡@£µ .config ¡@¡@¡@¡@èXµÔ¡@¡@¡@¡@¡@££¡@¡@ RockPaperScissors.exe.config¡@¡@ÆB¡@¡@¡@¡@¡@¡@¡@¡@¡@
¡@?xml version="1.0" encoding="utf-8"?¡@
¡@configuration¡@
¡@configSections¡@
¡@!-- ¡@¡@¬Ñ¡@¡@³õ¡@¡@¡@¡@¡@¥s¡@ºØ¡@
ºN¡@¡@¼KðE¶Ç¡o¡@ôm¡@ãc§Ë¡@¡@¡@¡@µÜ¡@¡@
¶Ç¡o¤~¡@--¡@
¡@section name="microsoft.web.services"
type="Microsoft.Web.Services.
Configuration.WebServicesConfiguration,
Microsoft.Web.Services, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" /¡@
¡@/configSections¡@
¡@microsoft.web.services¡@
¡@policy¡@
¡@send¡@
¡@cache name="policyCache.xml" /¡@
¡@/send¡@
¡@/policy¡@
¡@/microsoft.web.services¡@
¡@/configuration¡@
¬Ñ³æµÜ¡@¡@¡@¡@¡@¡@¬é¡@¤~¡@ policyCache.xml ¡@¡@¡@¡@ðE¡@¡@¡@¡@¡@ Web ¡@¥zªÄ¡o¡@á¡@
WSE 2.0 ¡@¡@
WSE 1.0 ¡@ WSE 2.0 ¡@¤B¡@¶[¡@¡@¡@Öv¬Ñ WS-Addressing ¡@¡@¡@¡@WS-Addressing Äø¶Ç¡@ WSE 1.0 ¡@¡@¡@¡@ WS-Routing Ïï¡@¡@¡@³õ¡@¡@¡@¡@¡@¡@¡@¡@¡@£¤©·¡@WS-Addressing ¡@Öv¡@¡@íå¡@¡@¹j¡@¹j¡@¡@¡@£nÖvÅ÷£¢¡@¾P¼f¡@¡@ To ¢Q From §¨ò³¡@¡@¡@ SOAP á¡@¡@¡@WS-Addressing ¡@¡@¡@ Action¡@ReplyTo ¢Q FaultTo §¨ò³¡@Action §¨ò³ºN¡@¡@¡@¡@ HTTP ¬é¡@ SOAP ¡@¡@¡@¡@¡@£~¡@¡@ SOAPAction HTTP §¨ò³¡@¬Ñ¡@ .asmx Web ¡@¥z¡@HTTP SOAPAction §¨ò³¡@¡@ë§¡~¾X£O¨{¡@¡@¡@¡@µÜÖÅ¡@¡@¥z¡@¡@¾P Web ¡@Úu¡@¡@¡@ºN¡@¡@Action SOAP §¨ò³¡@¡@ë§¡~¡@¡@ïþ HTTP ¨{¶ô¾X£O¡@¡@¡@ðEÖÅ¡@¡@£¸p¡@
¡@ Rock Paper Scissors µÜ¡@¡@¡@¡@¡@¡@¡@Á{¡@¡@¡@ ReplyTo §¨ò³£¤ë§¡~¾X£O¡@¡@¡@¡@¡@¡@¡@¡@¿Ø¬Ñ³æµÜ¡@¡@¡@¡@¡@¡@ RPSService ¬é¡@¦ä¡@ RegisterPlayer ¡@¡@¡@¡@¡@¡@¡~¡@¡@ ReplyTo ·É¾×íå¡@¡@¡@¬Ñ³æ¡@á¡@¡È¡@¡@£¤¾X£O¬Ñ¡@¬é¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ºN¡@¡@¿Ø§÷¡@¡@¬Ñ³æµÜ¡@¡@¡@¡@ FindPlayer ¡@¡@¬é¡@¡@ RPSServer ¡@¡@RPSServer ¡@¡@¡@¡@¡@¡@£V ReplyTo §¨ò³¡@¡@¡@¡@ÆB§¨ò³¡@¡@§÷¡@¡@¬Ñ³æµÜ¡@¡@¡@¡@·É¾×íå¡@¡@âò¡@ã@§÷¡@¡@¬Ñ³æµÜ¡@¡@¡@µÜÆB¡@¡@¡@¡@¡@¡@¡@¡@¬é¡@¡@§÷¡@¡@¬Ñ³æµÜ¡@¡@¡@¡@·É¾×íå¡@¡@¡@¡@¡@¬Ñ³æ¡@¡@¡@¡@¡@§¿¡@¡~ ReplyTo §¨ò³£¤¡@×@¡@¡@¾X£O¡@¡@¡@¡@¡@¡@¡@¡@
¡@¡@Öv¬Ñ³æµÜ¡@¡@¡@£~¡@¡@³õ¡@¡@Úò¡@¡@¡@Úò¡@¡@¡@¡@¯s¡@¬Ñ³æ¡@á¡@ò~¡@¡@ÖÅ¡@ RPSServer RegisterPlayer Web ¡@Úu¡@Íg¡@¡@ ReplyTo §¨ò³¡@¡@ URI¡@
myPeerUri
= new Uri("soap.tcp://"
+ System.Net.Dns.GetHostName()
+ ":3131/RPSPeer1");
SoapReceivers.Add(myPeerUri, typeof(PeerService));
RPSServ.RPSServerWse proxy = new RPSServ.RPSServerWse();
proxy.RequestSoapContext.ReplyTo = myPeerUri;
TCP ¡@¡@¡@í~
¡@ WSE 2.0 ¡@¡@¡@¡@¡@í~Öv¡@¡@¡@¡@¡@¡@ðE³õ¡@¡@WSE 2.0 ¡@¡@°ø£» TCP ¡@¥s¡@/¡@µÜ¡@£D TCP ¡@ªÄ¡@¡@¡@¡@áÅ÷£¢¡@¡@¡@¡@¡@¡@££¡@ Rock Paper Scissors µÜ¡@¡@¡@¡@¡@¡@¡@¡@¬é¡@¡@¡@£¤¡@¡@¡@²£¬Ñ¡@¡@¡~§øÄæÀt££Öv¡@¦J©Ú¡@¡@ò³¡@¡@¡@ªÝ¡@¡@¡@¡@¡@¡@£{ãs¡@¡@¡@¡@£¤ë§¡~¬é¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@³æ¡@´fðE¬é¡@¡@µÜ¡@¥s¡@¡@¡@¡@¡@¡@¡@£~¡@°ø£» TCP ¡@¡@£¤Àtí}¡@¡~§øÄæ¡@¡@á¡@¡@¡@¡@¬é¡@£µ¯¹¡@¡@µÜ¡@¡@¡@¡@¡@¡@³æ¡@¡@¡@¡@¬Ñ¡@¡@²£¬é¡@£µ¯¹¡@¡@¡@¡@¡@¡@¡@¡@¡@ºN¡@¡@¡@¡@¡@¬é¡@¬éÒݦä¡@¡@¤æ³æ¡@¡@¡@¡@£V¡@¡@¯¹¡@§ý¡@¡@¡@¡@¡@¬é¡@¡@¡@¡@¡@¥s¡@¡@£K¡@¡@µÜ¡@
¡@¡@¡@¡@
3¡@,¿ØÍg¡@§÷
2¡@
1 2 3