Freigeben über


sqloptions:sqlSession (Header Element)

Durch die Option sqloptions:sqlSession erhält der Client die Fähigkeit, die Sitzung für die Anforderung zu steuern, wenn sie einen SOAP-Header enthält und einen als SOAP-Header angezeigt wird.

Der Header besteht aus einem Element namens sqloptions:sqlSession. Das Element verfügt über fünf optionale Attribute: initiate, terminate, sessionId, timeout und transactionDescriptor. Weitere Informationen zum Verwenden einzelner Attribute und zu deren Verhalten finden Sie unter Arbeiten mit SOAP-Sitzungen.

In einer Anforderung oder Antwort kann jeweils nur eine Instanz der Option sqloptions:sqlSession vorkommen. Mehrere Instanzen der Option generieren einen Fehler.

Das folgende Beispiel ist ein Schemafragment für die Option sqloptions:sqlSession:

<xs:element name="sqlSession form="qualified">
    <xs:annotation>
        <xs:documentation>
            SQL Server SOAP Session
        </xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:attribute
          name="initiate"
          default="false"
          type="xs:boolean"
          form="unqualified">
            <xs:annotation>
                <xs:documentation>
                    TRUE to request to start a new session
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute
          name="terminate"
          default="false"
          type="xs:boolean"
          form="unqualified">
            <xs:annotation>
                <xs:documentation>
                    TRUE to request to terminate an existing session
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sessionId" type="xs:base64Binary" form="unqualified">
            <xs:annotation>
                <xs:documentation>
                    The ID of a session
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="timeout" type="xs:int" form="unqualified">
            <xs:annotation>
                <xs:documentation>
                    The timeout in seconds before the session expires.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute
          name="transactionDescriptor"
          type="xs:base64Binary"
          form="unqualified">
            <xs:annotation>
                <xs:documentation>
                    The descriptor of a transaction to enlist to.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:element>

Siehe auch

Verweis

SOAP-Erweiterungsheader

Hilfe und Informationen

Informationsquellen für SQL Server 2005