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='https://www.w3.org/2003/05/soap-envelope'

xmlns:wsa='https://schemas.xmlsoap.org/ws/2003/03/addressing'

xmlns:wse='https://schemas.xmlsoap.org/ws/2004/01/eventing' >

    <s12:Header>

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

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

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

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

    </s12:Header>

    <s12:Body>

        <wse:Subscribe>

        <wse:NotifyTo>

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

           </wse:NotifyTo>

        </wse:Subscribe>

    </s12:Body>

</s12:Envelope>

Comments