Aracılığıyla paylaş


sqloptions:notificationRequest üstbilgi öğesi

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The sqloptions:notificationRequest option enables the istemci to specify the query bildirim to trigger for the request, for example:

<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>

The sqloptions:notificationRequest option appears as a SOAP header.Üstbilgi adında bir öğe oluşur sqloptions:notificationRequest. The element has two mandatory attributes, notificationId and deliveryService, and one optional attribute, timeout.notificationId and deliveryService are both text values, and timeout is an xsd:integer value.Nasıl kullanılacağı hakkında daha fazla bilgi için sqloptions:notificationRequest Sorgu bildirimleri seçenek için bkz: Sorgu bildirimleri için abone olmak için bir SOAP üstbilgisi'ni kullanma.

Yalnızca örnek sqloptions:notificationRequest seçeneği, bir istekte bulunabilir.Seçeneği, bir yanıtta bulunamaz.Seçenek birden çok örneğini bir hata üretecektir.

Aşağıdaki için şemanın bir parçası olan sqloptions:notificationRequest Seçenek:

<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>

Bu üstbilgi belirtildiğinde, sorgu bildirimleri için bir abonelik istedi.Daha fazla bilgi için bkz:Sorgu bildirimleri kullanma.

Örnekler

Kullanım örnekleri aşağıdadır sqloptions:notificationRequest istek ve yanıt iletilerinde SOAP üstbilgisi.

Isteği

<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>

Yanıt

<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>

See Also

Reference