The Notification Proxy
The class WeatherSummaryNotificationProxy is very similar to the generated proxy on the client side, containing both asynchronous and synchronous service operation methods that are used by the server (see Implementing the Call to the Notification Endpoint and The Solicit-Response Operation Call.
Here is a brief excerpt of the proxy’s API:
 
class WeatherSummaryNotificationProxy : public rwsf::Client {
public:
static WeatherSummaryNotificationProxy make(const std::string&
location = "http://localhost:8090/weather/WeatherSummary"); //1
static WeatherSummaryNotificationProxy
make(const rwsf::Transport& transport); //2
...
 
void weatherNotification(const wsx::WeatherSummary& weatherData_in); //3
void weatherNotification(rwsf::CallInfo& callInfo,
const wsx::WeatherSummary& weatherData_in);
rwsf::AsyncHandle weatherNotificationStart(
const wsx::WeatherSummary& weatherData_in);
rwsf::AsyncHandle weatherNotificationStart(rwsf::CallInfo& info,
const wsx::WeatherSummary& weatherData_in);
void weatherNotificationEnd(rwsf::AsyncHandle& handle);
 
bool verifySubscription();
bool verifySubscription(rwsf::CallInfo& callInfo);
rwsf::AsyncHandle verifySubscriptionStart();
rwsf::AsyncHandle verifySubscriptionStart(rwsf::CallInfo& info);
bool verifySubscriptionEnd(rwsf::AsyncHandle& handle);
...
}
//1 Static make() method for obtaining a proxy instance based on a location. This was used in the server implementation described above:
WeatherSummaryNotificationProxy notifProxy =
WeatherSummaryNotificationProxy::make(location);
//2 Static make method that takes an rwsf::Transport object.
//3 Synchronous and asynchronous versions of the two operation methods initiated on the server. The asynchronous methods allow the client to continue execution after making one of these calls, without having to wait on the transport-level reply inherent in synchronous transports such as HTTP and HTTPS