DPWS デバイス用のコンテナー ID

Windows 7 以降では、PnP 拡張機能 (PnP-X) と Device Profile for Web Services (DPWS) をサポートするデバイスは、デバイス メタデータ ドキュメントに ContainerId XML 要素を含めることでコンテナー ID を指定できます。 DPWS と DPWS デバイス メタデータ ドキュメントの詳細については、「DPWS の仕様」を 参照してください。

Note

Windows 10 以降では、システムはデバイスによって提供されるコンテナー ID を無視し、代わりに独自に生成します。 これは、デバイスのエンドポイント参照アドレス (EPR) の GUID またはデバイスの EPR の SHA-1 ハッシュ (GUID ではない場合) を使用して行われます。

ContainerId XML 要素は、次のように宣言されます。

<df:ContainerId xmlns:df="">
  xs:string
</df:ContainerId>

ContainerId XML 要素型は文字列であり、値はグローバル一意識別子 (GUID) 形式です。 この文字列は {{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}} として書式設定されます。

ContainerId XML 要素の例を次に示します。

<df:ContainerId xmlns:df="">
  {101392d0-5e91-11dd-ad8b-0800200c9a66}
</df:ContainerId>

<ContainerId> XML 要素は、デバイス メタデータ交換 Simple Object Access Protocol (SOAP) メッセージの <ThisDevice> セクションに含まれている必要があります。 次の例は、メタデータ交換メッセージ内の <ContainerId> 要素の正しい配置を示しています。

Note

これは完全な DPWS メタデータ交換ドキュメントではありません。 DPWS の詳細については、「DPWS の仕様」を参照してください。

<soap:Envelope
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wsdisco="http://schemas.xmlsoap.org/ws/2005/04/discovery"
    xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
    xmlns:wsd="http://schemas.xmlsoap.org/ws/2006/02/devprof"
    xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">

    <soap:Header>
        <!-- Place SOAP header information here.-->
    </soap:Header>

    <soap:Body>
        <wsx:Metadata>

           <wsx:MetadataSection
                Dialect="http://schemas.xmlsoap.org/ws/2005/05/devprof/ThisModel">
                <wsd:ThisDevice>
                    <!-- Place ThisDevice metadata here.-->
                    <df:ContainerId>
                        <!--- Place the ContainerID GUID here.--->
                        {101392d0-5e91-11dd-ad8b-0800200c9a66}
                    </df:ContainerId>
                </wsd:ThisDevice>
            </wsx:MetadataSection>

        </wsx:Metadata>
    </soap:Body>
</soap:Envelope>

DPWS デバイス メタデータ ドキュメントに ContainerId XML 要素が含まれていない場合、プラグ アンド プレイ (PnP) マネージャーは、デバイスのエンドポイント参照アドレスの値をコンテナー ID として使用します。