ProbeMatches 消息是服务发送的 WS-Discovery 消息,用于响应客户端的 Probe 消息。 有关 ProbeMatches 消息的详细信息,请参阅 WS-Discovery 规范的第 5.3 节。
ProbeMatches 消息由 UDP 单播发送到客户端 探测 消息从中发送的端口。 探测消息的 4 秒内必须发送 ProbeMatches;否则,Windows 防火墙可能会删除数据包。
如果 ProbeMatches 消息中不包含 XAddrs,则客户端可以通过 UDP 多播将 解析 消息发送到端口 3702。 仅当发送 HTTP 消息(如 获取元数据交换请求或服务消息)时,客户端才会发送解析消息。
发送 探测 消息的任何 DPWS 应用程序都将接收 ProbeMatches 消息。
注意
本主题演示 WSDAPI 客户端和主机生成的 DPWS 消息示例。 WSDAPI 将分析和接受不符合此示例的其他 DPWS 兼容消息。 请勿使用此示例验证 DPWS 互作性;请改用 WSDAPI 基本互作性工具(WSDBIT)。
以下 SOAP 消息显示示例 ProbeMatches 消息。
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsd="https://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:wsdp="https://schemas.xmlsoap.org/ws/2006/02/devprof">
<soap:Header>
<wsa:To>
https://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
</wsa:To>
<wsa:Action>
https://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches
</wsa:Action>
<wsa:MessageID>
urn:uuid:967d0036-fe69-40ad-8191-dd1fc8ef64ab
</wsa:MessageID>
<wsa:RelatesTo>
urn:uuid:29cf10da-5c41-4d55-b184-5ee15e38ce23
</wsa:RelatesTo>
<wsd:AppSequence InstanceId="1"
SequenceId="urn:uuid:369a7d7b-5f87-48a4-aa9a-189edf2a8772"
MessageNumber="9">
</wsd:AppSequence>
</soap:Header>
<soap:Body>
<wsd:ProbeMatches>
<wsd:ProbeMatch>
<wsa:EndpointReference>
<wsa:Address>
urn:uuid:37f86d35-e6ac-4241-964f-1d9ae46fb366
</wsa:Address>
</wsa:EndpointReference>
<wsd:Types>wsdp:Device</wsd:Types>
<wsd:XAddrs>
https://192.168.0.2:5357/37f86d35-e6ac-4241-964f-1d9ae46fb366
</wsd:XAddrs>
<wsd:MetadataVersion>2</wsd:MetadataVersion>
</wsd:ProbeMatch>
</wsd:ProbeMatches>
</soap:Body>
</soap:Envelope>
ProbeMatches 消息具有以下焦点。
| 焦点 | XML | 描述 |
|---|---|---|
| ProbeMatches | |
ProbeMatches SOAP作将消息标识为 ProbeMatches 消息。 |
| RelatesTo | |
服务正在响应的消息的标识符。 此标头与 探测 消息中的 MessageId 匹配。 |
| AppSequence | |
包含应用程序排序信息,这有助于维护消息序列,即使消息已按顺序接收。 AppSequence 已按照 AppSequence 验证规则中所述进行验证。 |
| 地址 | |
包含终结点地址。 可以在 解析 消息中引用此地址。 |
| XAddrs | |
XAddrs 是可用于客户端和服务之间的通信的传输地址。 XAddr 验证规则中所述,对添加器进行验证。 |
相关主题