subscribeRequest.setConsumerReference(notificationBroker.getEpr());
subscribeRequest.setFilter(new FilterType());
subscribeRequest.getFilter().getAny().add(
new JAXBElement<TopicExpressionType>(AbstractSubscription.QNAME_TOPIC_EXPRESSION,
TopicExpressionType.class, topic));
SubscribeResponse response = notificationProducer.subscribe(subscribeRequest);
return WSNHelper.getInstance()
.getPort(response.getSubscriptionReference(), SubscriptionManager.class);
} catch (Exception e) {
LOGGER.log(Level.INFO, "Error while subscribing on-demand publisher", e);
return null;
}
}