Intel AMT Features > WS-Eventing > Use Cases > Subscribe for Events
CollapseAll image

Subscribe for Events

The following steps describe how to subscribe for events.

1.  Retrieve the instances of CIM_FilterCollection.

2.  To find the required subscription filter, look for an instance of CIM_FilterCollection where the “InstanceID” key equals the desired filter, for example “Intel(r) AMT:All” (see WS-Eventing Event Filters).

3.  For that instance, invoke CIM_FilterCollection.Subscribe(“ServerURL”), where “ServerURL” is limited to 253 characters (longer URLs will be ignored).

 Note:

Support for the https protocol was added in Intel AMT Version 11.0.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$instanceID ="Intel(r) AMT:All" # The instance ID of the desired filter.

$filterCollectionRef =$wsmanConnectionObject.NewReference("SELECT * FROM CIM_FilterCollection WHERE InstanceID='" +$instanceID +"'")

$listenerDestinationWSManagementRef =$filterCollectionRef.Subscribe("http://schemas.dmtf.org/wbem/wsman/1/wsman/PushWithAck","192.168.0.0:5000")

 

 

Additional Information

The following example demonstrates a WS-Eventing subscription request in the XML format that the Intel AMT firmware expects to receive:

<soap:Envelope

    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

    xmlns:tns="http://schemas.dmtf.org/wbem/wscim/1/cim-      

  chema/2/CIM_FilterCollection"

    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"    

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"

    xmlns:wscat="http://schemas.xmlsoap.org/ws/2005/06/wsmancat"

    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"

    xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer"

    xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"

    xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"

    xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"

    xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"

    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-

  wssecurity-secext-1.0.xsd"

 

    <-- Optional: Added for the Reference Parameters -->

    xmlns:m=”http://mynamespace.com”

 

  <soap:Header>

    <-- This is the Intel AMT machine address -->

    <wsa:To>http://myAmtMachine:16992/wsman</wsa:To>

    <wsa:ReplyTo>

      <wsa:Address soap:mustUnderstand="true">

    http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous

      </wsa:Address>

    </wsa:ReplyTo>

    <wsa:Action soap:mustUnderstand="true">

    http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe

    </wsa:Action>

    <wsman:MaxEnvelopeSize soap:mustUnderstand="true">

    51200

    </wsman:MaxEnvelopeSize>

    <wsa:MessageID>

      uuid:85062157-5705-0256-4754-850551807361

    </wsa:MessageID>

    <wsman:ResourceURI soap:mustUnderstand="true">

    http://schemas.dmtf.org/wbem/wscim/1/cim-

    schema/2/CIM_FilterCollection

    </wsman:ResourceURI>

    <wsman:SelectorSet>

      <wsman:Selector Name="InstanceID">

    <-- this is the CIM_FilterCollection ID -->

    Intel(r) AMT:All
      </wsman:Selector>

    </wsman:SelectorSet>

    <wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout>

    <-- Optional: To request digest authentication when alerts are sent -->             

    <wst:IssuedTokens soap:mustUnderstand="true">

      <wst:RequestSecurityTokenResponse>

        <wst:TokenType>

    http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-

    token-profile-1.0#UsernameToken

        </wst:TokenType>

    xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"

    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

     <wst:RequestedSecurityToken>

       <wsse:UsernameToken>

      <-- username -->

         <wsse:Username>John</wsse:Username>

         <wsse:Password

      Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-

      wssecurity-secext-1.0.xsd#PasswordText">

      <-- Password -->

          Pwd!123

      </wsse:Password>

       </wsse:UsernameToken>

     </wst:RequestedSecurityToken>

    </wst:RequestSecurityTokenResponse>

  </wst:IssuedTokens>

  <-- End of digest authentication section -->    

  </soap:Header>

  <soap:Body>

    <wse:Subscribe>

      <wse:Delivery Mode =

  <-- release 5.0 and above -->

  "http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push">

  <-- or (for requiring an ack) -->

  “http://schemas.dmtf.org/wbem/wsman/1/wsman/PushWithAck”>

  <-- release 4.0 -->

  “http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push”>

  <-- or (for requiring an ack) -->

     “http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/

     PushWithAck”>

     <wse:NotifyTo>

       <wsa:Address>

          <-- This is the URL for receiving events (63 chars max)-->

          http://www.myserver.com:1234/eventsink

    </wsa:Address>

 

    <-- Optional: References Parameters (will be present in the

        event) -->

    <wsa:ReferenceParameters>

          <-- This is free style -->

          <m:Hello>here</m:Hello>

          <m:Goodbye>there</m:Goodbye>

    </wsa:ReferenceParameters>

    <-- End of optional Reference Parameters -->

        

     </wse:NotifyTo>

 

        <-- Optional – if digest authorization is requested -->

        <wsman:Auth                               

          Profile="http://schemas.xmlsoap.org/ws/2004/08/eventing/

          DeliveryModes/secprofile/http/digest"/>

        <-- End of digest authorization section -->

 

   </wse:Delivery>

    </wse:Subscribe>

  </soap:Body>

</soap:Envelope>

 

Instance Diagram

Classes Used in This Flow

SDK Sample

If there is a sample demonstrating this flow, it is included in the SDK installation file. See SDK Installation Layout for details.

 

See Also:

   WS-Eventing Event Subscribers

   WS-Eventing Event Filters

   Additional Subscription Options

Copyright © 2006-2022, Intel Corporation. All rights reserved.