use of org.oasis_open.docs.wsn.b_2.GetCurrentMessage in project cxf by apache.
the class NotificationBroker method getCurrentMessage.
public List<Object> getCurrentMessage(String topic) throws // CHECKSTYLE:OFF - WS-Notification spec throws a lot of faults
TopicNotSupportedFault, TopicExpressionDialectUnknownFault, MultipleTopicsSpecifiedFault, InvalidTopicExpressionFault, ResourceUnknownFault, NoCurrentMessageOnTopicFault {
// CHECKSTYLE:ON
GetCurrentMessage getCurrentMessageRequest = new GetCurrentMessage();
if (topic != null) {
TopicExpressionType topicExp = new TopicExpressionType();
topicExp.getContent().add(topic);
getCurrentMessageRequest.setTopic(topicExp);
}
GetCurrentMessageResponse response = getBroker().getCurrentMessage(getCurrentMessageRequest);
return response.getAny();
}
use of org.oasis_open.docs.wsn.b_2.GetCurrentMessage in project cxf by apache.
the class AbstractNotificationBroker method getCurrentMessage.
/**
* @param getCurrentMessageRequest
* @return returns org.oasis_open.docs.wsn.b_1.GetCurrentMessageResponse
* @throws MultipleTopicsSpecifiedFault
* @throws TopicNotSupportedFault
* @throws InvalidTopicExpressionFault
* @throws ResourceUnknownFault
* @throws TopicExpressionDialectUnknownFault
* @throws NoCurrentMessageOnTopicFault
*/
@WebMethod(operationName = "GetCurrentMessage")
@WebResult(name = "GetCurrentMessageResponse", targetNamespace = "http://docs.oasis-open.org/wsn/b-1", partName = "GetCurrentMessageResponse")
public GetCurrentMessageResponse getCurrentMessage(@WebParam(name = "GetCurrentMessage", targetNamespace = "http://docs.oasis-open.org/wsn/b-1", partName = "GetCurrentMessageRequest") GetCurrentMessage getCurrentMessageRequest) throws // CHECKSTYLE:OFF - WS-Notification spec throws a lot of faults
InvalidTopicExpressionFault, MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault, ResourceUnknownFault, TopicExpressionDialectUnknownFault, TopicNotSupportedFault {
// CHECKSTYLE:ON
LOGGER.finest("GetCurrentMessage");
NoCurrentMessageOnTopicFaultType fault = new NoCurrentMessageOnTopicFaultType();
throw new NoCurrentMessageOnTopicFault("There is no current message on this topic.", fault);
}
Aggregations