Bye 消息

Bye 消息是用于宣布设备或服务离开网络的WS-Discovery消息。 有关 Bye 消息的详细信息,请参阅 WS-Discovery 规范的第 4.2 节。

再见消息是未经请求的。 消息是可选的。

注意

本主题演示 WSDAPI 客户端和主机生成的 DPWS 消息示例。 WSDAPI 将分析和接受不符合此示例的其他符合 DPWS 的消息。 不要使用此示例来验证 DPWS 互操作性;请改用 WSDAPI 基本互操作性工具 (WSDBIT)

 

以下 SOAP 消息显示了一个示例 Bye 消息。

<?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">
<soap:Header>
    <wsa:To>
        urn:schemas-xmlsoap-org:ws:2005:04:discovery
    </wsa:To>
    <wsa:Action>
        https://schemas.xmlsoap.org/ws/2005/04/discovery/Bye
    </wsa:Action>
    <wsa:MessageID>
        urn:uuid:193ccfa0-347d-41a1-9285-f500b6b96a15
    </wsa:MessageID>
    <wsd:AppSequence InstanceId="2"
        SequenceId="urn:uuid:369a7d7b-5f87-48a4-aa9a-189edf2a8772"
        MessageNumber="21">
    </wsd:AppSequence>
</soap:Header>
<soap:Body>
    <wsd:Bye>
        <wsa:EndpointReference>
            <wsa:Address>
                urn:uuid:37f86d35-e6ac-4241-964f-1d9ae46fb366
            </wsa:Address>
        </wsa:EndpointReference>
    </wsd:Bye>
</soap:Body>

Bye 消息具有以下焦点。

焦点 XML 说明
再见
<wsa:Action>
    https://schemas.xmlsoap.org/ws/2005/04/discovery/Bye
</wsa:Action>
Bye SOAP 操作将消息标识为 Bye 消息。
AppSequence
<wsd:AppSequence InstanceId="2"
    SequenceId="urn:uuid:369a7d7b-5f87-48a4-aa9a-189edf2a8772"
    MessageNumber="21">
</wsd:AppSequence>
包含应用程序排序信息,这有助于维护消息的序列,即使消息是无序接收的。 AppSequence 已按照 AppSequence 验证规则中所述进行验证。
地址
<wsa:Address>
    urn:uuid:37f86d35-e6ac-4241-964f-1d9ae46fb366
</wsa:Address>
包含终结点脱机的地址。

 

发现和元数据交换消息

Hello 消息