in modules/core/src/main/java/org/apache/savan/eventing/EventingSubscriptionProcessor.java [234:267]
public ExpirationBean getExpirationBean(SavanMessageContext renewMessage)
throws SavanException {
SOAPEnvelope envelope = renewMessage.getEnvelope();
SOAPBody body = envelope.getBody();
ExpirationBean expirationBean = null;
OMElement renewElement = body.getFirstChildWithName(new QName(
EventingConstants.EVENTING_NAMESPACE, EventingConstants.ElementNames.Renew));
if (renewElement == null) {
String message = "Renew element not present in the assumed Renew Message";
throw new SavanException(message);
}
OMElement expiresElement = renewElement.getFirstChildWithName(new QName(
EventingConstants.EVENTING_NAMESPACE, EventingConstants.ElementNames.Expires));
if (expiresElement != null) {
String expiresText = expiresElement.getText().trim();
expirationBean = getExpirationBeanFromString(expiresText);
}
String subscriberID = getSubscriberID(renewMessage);
if (subscriberID == null) {
String message = "Cannot find the subscriber ID";
throw new SavanException(message);
}
renewMessage
.setProperty(EventingConstants.TransferedProperties.SUBSCRIBER_UUID, subscriberID);
expirationBean.setSubscriberID(subscriberID);
return expirationBean;
}