Search in sources :

Example 1 with GetMessagesResponse

use of org.oasis_open.docs.wsn.b_2.GetMessagesResponse in project cxf by apache.

the class PullPoint method getMessages.

public List<NotificationMessageHolderType> getMessages(long max) throws UnableToGetMessagesFault, ResourceUnknownFault {
    GetMessages getMessages = new GetMessages();
    getMessages.setMaximumNumber(BigInteger.valueOf(max));
    GetMessagesResponse response = pullPoint.getMessages(getMessages);
    return response.getNotificationMessage();
}
Also used : GetMessagesResponse(org.oasis_open.docs.wsn.b_2.GetMessagesResponse) GetMessages(org.oasis_open.docs.wsn.b_2.GetMessages)

Example 2 with GetMessagesResponse

use of org.oasis_open.docs.wsn.b_2.GetMessagesResponse in project cxf by apache.

the class AbstractPullPoint method getMessages.

/**
 * @param getMessagesRequest
 * @return returns org.oasis_open.docs.wsn.b_1.GetMessagesResponse
 * @throws ResourceUnknownFault
 * @throws UnableToGetMessagesFault
 */
@WebMethod(operationName = "GetMessages")
@WebResult(name = "GetMessagesResponse", targetNamespace = "http://docs.oasis-open.org/wsn/b-1", partName = "GetMessagesResponse")
public GetMessagesResponse getMessages(@WebParam(name = "GetMessages", targetNamespace = "http://docs.oasis-open.org/wsn/b-1", partName = "GetMessagesRequest") GetMessages getMessagesRequest) throws ResourceUnknownFault, UnableToGetMessagesFault {
    LOGGER.finest("GetMessages");
    BigInteger max = getMessagesRequest.getMaximumNumber();
    List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue() : 0);
    GetMessagesResponse response = new GetMessagesResponse();
    response.getNotificationMessage().addAll(messages);
    return response;
}
Also used : GetMessagesResponse(org.oasis_open.docs.wsn.b_2.GetMessagesResponse) BigInteger(java.math.BigInteger) NotificationMessageHolderType(org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType) WebMethod(javax.jws.WebMethod) WebResult(javax.jws.WebResult)

Aggregations

GetMessagesResponse (org.oasis_open.docs.wsn.b_2.GetMessagesResponse)2 BigInteger (java.math.BigInteger)1 WebMethod (javax.jws.WebMethod)1 WebResult (javax.jws.WebResult)1 GetMessages (org.oasis_open.docs.wsn.b_2.GetMessages)1 NotificationMessageHolderType (org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType)1