use of javax.jws.WebResult 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);
}
use of javax.jws.WebResult 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;
}
use of javax.jws.WebResult in project cxf by apache.
the class AbstractSubscription method renew.
/**
* @param renewRequest
* @return returns org.oasis_open.docs.wsn.b_1.RenewResponse
* @throws UnacceptableTerminationTimeFault
* @throws ResourceUnknownFault
*/
@WebMethod(operationName = "Renew")
@WebResult(name = "RenewResponse", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "RenewResponse")
public RenewResponse renew(@WebParam(name = "Renew", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "RenewRequest") Renew renewRequest) throws ResourceUnknownFault, UnacceptableTerminationTimeFault {
XMLGregorianCalendar time = validateTerminationTime(renewRequest.getTerminationTime());
this.setTerminationTime(time);
renew(time);
RenewResponse response = new RenewResponse();
response.setTerminationTime(time);
response.setCurrentTime(getCurrentTime());
return response;
}
use of javax.jws.WebResult in project quickstarts by jboss-switchyard.
the class AirportService method getFLTID.
/**
* Get flight identifier for the parameters.
* @param from place (city)
* @param to place (city)
* @param date of flight
* @return format [from/to/month/day]
*/
@WebMethod
@WebResult(name = "fltid")
public String getFLTID(@WebParam(name = "from") String from, @WebParam(name = "to") String to, @WebParam(name = "date") Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
return from + "/" + to + "/" + String.valueOf(c.get(Calendar.MONTH) + 1) + "/" + String.valueOf(c.get(Calendar.DAY_OF_MONTH));
}
use of javax.jws.WebResult in project quickstarts by jboss-switchyard.
the class AirportService method getFLTID.
/**
* Get flight identifier for the parameters.
* @param from place (city)
* @param to place (city)
* @param date of flight
* @return format [from/to/month/day]
*/
@WebMethod
@WebResult(name = "fltid")
public String getFLTID(@WebParam(name = "from") String from, @WebParam(name = "to") String to, @WebParam(name = "date") Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
return from + "/" + to + "/" + String.valueOf(c.get(Calendar.MONTH) + 1) + "/" + String.valueOf(c.get(Calendar.DAY_OF_MONTH));
}
Aggregations