裝置和服務檢查案例
裝置和服務檢查案例會測試裝置探索,以及後續的裝置和服務檢查。
裝置和託管服務的基本探索提供其餘案例的基礎結構。
裝置必須使用 xs:anyURI testdevice 作為 wsd:Scopes 元素來進行探索。
下表描述此案例。
步驟 | 用戶端動作 | 伺服器動作 | Pass-Fail準則 |
---|---|---|---|
1.1 | TestDevice boot\shutdown | ||
1.1.1 | Nothing | TestDevice 會啟動並傳送 Hello。 | 您好在用戶端正確收到。 |
1.1.2 | Nothing | TestDevice 會關閉並傳送 Bye。 | 在用戶端正確收到 Bye。 wsa:EndpointReference/wsa:Address應該與步驟 1.1.1 中使用的位址相同。 |
1.1.3 | Nothing | TestDevice 會再次啟動,並傳送 Hello。 | Hello 在 1.1.1 中正確收到相同的中繼資料版本。 wsa:EndpointReference/wsa:Address應該與步驟 1.1.1 中使用的位址相同。 |
1.2 | TestDevice 的解析 | ||
1.2.1 | 傳送解析。 | 使用 ResolveMatches 回應。 | 移至步驟 1.2.2。 |
1.2.2 | 將 GetMetadaRequest 傳送至 TestDevice。 | 使用 GetMetadatResponse 回應。 | 移至步驟 1.2.3。 |
1.2.3 | 顯示 ThisDevice 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.2.4 | 顯示 ThisModel 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.2.5 | 顯示主機、HostedService、EndpointReference。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.2.6 | 傳送 urn:uuid:00000000-0000-0000-0000-00000000000 的解析 (,其位於裝置) 的 wsa:EndpointReference/wsa:Address 。 | 不做任何動作。 由於裝置不符合此 wsa:EndpointReference/wsa:Address,因此不應回應。 | 伺服器不會回應任何 ResolveMatches 訊息。 |
1.3 | TestDevice 的探查 | ||
1.3.1 | 傳送萬用字元探查: - 使用預設的比對規則。 - 沒有 wsd:Types 元素。 - 沒有 wsd:Scopes 元素。 |
使用 ProbeMatches 回應。 | 移至步驟 1.3.2 (或 1.3.3) 。 |
1.3.2 (選擇性。只有在 1.3.1.) 的 ProbeMatches 中未提供 wsd:XAddrs 時,才需要此步驟 | 從 1.2.1 將 Resolve 傳送至 ProbeMatches 中指定的 wsa:EndpointReference/wsa:Address。 | 使用 ResolveMatches 回應。 | 移至步驟 1.3.3。 |
1.3.3 | 將 GetMetadataRequest 傳送至 TestDevice。 | 使用 GetMetadataResponse 回應。 | 移至步驟 1.3.4。 |
1.3.4 | 顯示 ThisDevice 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.3.5 | 顯示 ThisModel 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.3.6 | 顯示主機、HostedService、EndpointReference。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.3.7 | 傳送指定下列條件的探查: - 使用預設比對規則。 - 要比對的類型: wsdp:Device。 (。請參閱上述命名空間資料表,以及 Web Services 的裝置設定檔中的 R1020.) - 沒有 wsd:Scopes 元素。 |
使用 ProbeMatches 回應。 | wsa:EndpointReference/wsa:Address的值與步驟 1.2.1 中的值相同。 |
1.3.8 | 傳送指定下列條件的探查: - 使用 Web 服務動態探索 (WS-Discovery) 規格中所定義的比對規則。 - 沒有 wsd:Types 元素。 - 使用下列專案作為範圍 testdevice。 |
使用 ProbeMatches 回應。 | wsa:EndpointReference/wsa:Address的值與步驟 1.2.1 中的值相同。 |
1.3.9 | 傳送指定下列專案的探查: - 使用 裝置設定檔進行 Web 服務 比對規則。 - 沒有 wsd:Types 元素。 - 使用下列專案作為範圍 testDEVICE。 |
不做任何動作。 此測試不會回應 ProbeMatches。 | 未收到任何訊息;等候 10 秒。 |
1.3.10 | 傳送指定下列的探查: - 使用預設比對規則。 - 使用虛構類型進行比對,例如 。 https://example.org/this/wont/work:Device - 沒有 wsd:Scopes 元素。 |
不做任何動作。 此測試不會回應 ProbeMatches。 | 未收到任何訊息;等候 10 秒。 |
1.4 | 導向探查 | ||
1.4.1 | 以 HTTP 要求方式傳送萬用字元探查: - 使用預設比對規則。 - 沒有 wsd:Types 元素。 - 沒有 wsd:Scopes 元素。 - 提供 HTTP 位址。 |
使用 HTTP 回應的 ProbeMatches 回應。 | 確認 TestDevice 的 wsa:EndpointReference/wsa:Address 正確。 |
1.5 | 在沒有探索的情況下取得中繼資料 | ||
1.5.1 | 將 GetMetadataRequest 傳送至 TestDevice。 | 使用 GetMetadataResponse 回應。 | 移至步驟 1.5.2。 |
1.5.2 | 顯示 ThisDevice 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.5.3 | 顯示 ThisModel 中繼資料。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |
1.5.4 | 顯示 Host、HostedService、EndpointReference。 | Nothing | 對應至已傳送的內容。 如需用戶端輸出的範例,請參閱 範例中繼資料回應輸出。 |