The Notification Pattern
The notification operation includes one output element, which is the server’s message to the client.
Figure 3 – The Notification message pattern
In WeatherSummary.wsdl, the notification pattern is defined by the operation weatherNotification:
<!-- Notification -->
<operation name="weatherNotification">
<output message="tns:weatherNotification"/>
The operation consists of one output message from the server to one or more clients.
<message name="weatherNotification">
<part name="weatherData" type="wsx:WeatherSummary"/>
The message contains a WeatherSummary element with updated weather conditions for the zip code specified in the WeatherSummary element.
HydraExpress uses special notification architecture to support this pattern. This architecture is described in Chapter 13.
This pattern is implemented on the server side by WeatherSummaryImp.cpp, which makes a call to the weatherNotification() operation method in the server-side notification proxy WeatherSummaryNotificationProxy.cpp, and on the client side in WeatherSummaryNotificationImp.cpp, which sets up a listener on the client to receive the notification.
For an additional examples on the notification pattern, see Chapter 10.