יום שישי, 24 במאי 2013

Wcf discovery find message in wireshark

The following code send a UPD discovery message using WCF
UdpDiscoveryEndpoint theUdpDiscoveryEndpoint = new UdpDiscoveryEndpoint();
theUdpDiscoveryEndpoint.TransportSettings.TimeToLive = 10;
DiscoveryClient theDiscoveryClient = new DiscoveryClient(theUdpDiscoveryEndpoint);
theDiscoveryClient.FindCompleted += new EventHandler<FindCompletedEventArgs>(DiscoveryClient_FindCompleted);
FindCriteria criteria = new FindCriteria(typeof(ICalculatorService));
criteria.Duration = TimeSpan.FromSeconds(5);
theDiscoveryClient.Find(criteria);
The message in the WireShark
I filtered the message by the message source :
Capture16
Then I search for the interface name in the  messages bytes
Capture17
Found the string in the following udp multicast message
Capture18 Copy the message text
Capture19
And the message is
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
  <s:Header>
    <a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Probe</a:Action>
    <a:MessageID>urn:uuid:70767617-f1b5-43c0-8b74-75783e96dde6</a:MessageID>
    <a:ReplyTo>
      <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
    </a:ReplyTo>
    <a:To s:mustUnderstand="1">urn:docs-oasis-open-org:ws-dd:ns:discovery:2009:01</a:To>
 
  <VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo72LlFawAk1HoE472q1eV4EAAAAAnfvDsoFUzEyRbNiEGHwV+dU9Ss0y1MBGkvXg5GTdSeYACQAA</VsDebuggerCausalityData>  </s:Header>
  <s:Body>
    <Probe xmlns="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01">
      <d:Types xmlns:d="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01" xmlns:dp0="http://Microsoft.Samples.Discovery">dp0:ICalculatorService</d:Types>
      <Duration xmlns="http://schemas.microsoft.com/ws/2008/06/discovery">PT5S</Duration>
    </Probe>
  </s:Body>
</
s:Envelope>
Ignoring  the VsDebuggerCausalityData . we can see the probe message along with the time out of 5 seconds .

אין תגובות:

הוסף רשומת תגובה