Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Die sqloptions:notificationRequest ermöglicht es dem Client, die für die Anforderung auszulösende Abfragebenachrichtigung anzugeben, z. B.:
<SOAP-ENV:Header
xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:sqloptions="https://schemas.microsoft.com/sqlserver/2004/SOAP/Options">
<sqloptions:notificationRequest
SOAP-ENV:mustUnderstand="1"
timeout="timeout value in seconds"
deliveryService="name of delivery service" />
</SOAP-ENV:Header>
Die Option sqloptions:notificationRequest wird als SOAP-Header verwendet. Der Header besteht aus einem Element namens sqloptions:notificationRequest. Das Element besitzt zwei obligatorische Attribute – notificationId und deliveryService, – sowie ein optionales Attribut: timeout. notificationId und deliveryService sind beides Textwerte, und timeout ist ein xsd:integer-Wert. Weitere Informationen zum Verwenden der sqloptions:notificationRequest-Option in Abfragebenachrichtigungen finden Sie unter Verwenden eines SOAP-Headers zum Abonnieren von Abfragebenachrichtigungen.
In einer Anforderung kann nur eine Instanz der Option sqloptions:notificationRequest angezeigt werden. Die Option darf nicht in einer Antwort verwendet werden. Mehrere Instanzen der Option generieren einen Fehler.
Das folgende Beispiel ist ein Schemafragment für die Option sqloptions:notificationRequest:
<xs:element name="notificationRequest" form="qualified">
<xs:annotation>
<xs:documentation>
Requests query notifications for the request.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute
use="required"
name="notificationId"
type="xs:string"
form="unqualified">
<xs:annotation>
<xs:documentation>
The notification identifier.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute
use="required"
name="deliveryService"
type="xs:string"
form="unqualified">
<xs:annotation>
<xs:documentation>
The deliveryService.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="timeout" type="xs:integer" form="unqualified">
<xs:annotation>
<xs:documentation>
The timeout value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
Wenn der Header angegeben ist, wird ein Abonnement für Abfragebenachrichtigungen angefordert. Weitere Informationen finden Sie unter Verwenden von Abfragebenachrichtigungen.
Beispiele
Die folgenden Beispiele zeigen die Verwendung des sqloptions:notificationRequest-Headers in SOAP-Anforderungs- und Antwortnachrichten.
Anforderung
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="https://schemas.microsoft.com/sqlserver/2004/SOAP"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sqlparam="https://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlParameter"
xmlns:sqlsoaptypes="https://schemas.microsoft.com/sqlserver/2004/SOAP/types"
xmlns:sqloptions="https://schemas.microsoft.com/sqlserver/2004/SOAP/Options">
<SOAP-ENV:Header>
<sqloptions:notificationRequest notificationId="notification"
timeout="1"
deliveryService="deliveryService" >
</sqloptions:notificationRequest>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<sql:sqlbatch>
<sql:BatchCommands></sql:BatchCommands>
</sql:sqlbatch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Antwort
<SOAP-ENV:Envelope xml:space="preserve"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="https://schemas.microsoft.com/sqlserver/2004/SOAP"
xmlns:sqlsoaptypes="https://schemas.microsoft.com/sqlserver/2004/SOAP/types"
xmlns:sqlrowcount="https://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount"
xmlns:sqlmessage="https://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage"
xmlns:sqlresultstream="https://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream"
xmlns:sqltransaction="https://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction"
xmlns:sqltypes="https://schemas.microsoft.com/sqlserver/2004/sqltypes">
<SOAP-ENV:Body>
<sql:sqlbatchResponse>
<sql:sqlbatchResult>
</sql:sqlbatchResult>
</sql:sqlbatchResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>