WS-Eventing: A Note on Namespaces



In part I of my discussion of WS-Eventing, I deliberately left the namespaces off the elements of the SOAP message.  I did this for clarity, but I feel a little bad about where I say “This is finally valid WS-Eventing” – because its really not completely valid without the namespaces.  So to salve my conscience, here is the final valid subscription from that article, with namespaces:



<s:Envelope


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


xmlns:wsa=’http://schemas.xmlsoap.org/ws/2003/03/addressing’


xmlns:wse=’http://schemas.xmlsoap.org/ws/2004/01/eventing’ >


    <s12:Header>


        <wsa:Action>http://schemas.xmlsoap.org/ws/2004/01/eventing/Subscribe</wsa:Action>


        <wsa:MessageID>http://www.me.com/subscriptions/583</wsa:MessageID>


        <wsa:ReplyTo>http://www.me.com/subscription-response-handler</wsa:ReplyTo>


        <wsa:To>http://www.ocean.com/notifications/shark-attacks</wsa:To>


    </s12:Header>


    <s12:Body>


        <wse:Subscribe>


           <wse:NotifyTo>


               <wsa:Address>http://www.me.com/shark-attack-notification-handler<wsa:Address>


           </wse:NotifyTo>


        </wse:Subscribe>


    </s12:Body>


</s12:Envelope>