}
public Object fromOMElement(OMElement ackRangePart) throws OMException {
if (ackRangePart == null)
throw new OMException("The passed element is null");
OMAttribute lowerAttrib = ackRangePart.getAttribute(new QName(
Sandesha2Constants.WSRM.LOWER));
OMAttribute upperAttrib = ackRangePart.getAttribute(new QName(
Sandesha2Constants.WSRM.UPPER));
if (lowerAttrib == null || upperAttrib == null)
throw new OMException(
"Passed element does not contain upper or lower attributes");
try {
long lower = Long.parseLong(lowerAttrib.getAttributeValue());
long upper = Long.parseLong(upperAttrib.getAttributeValue());
upperValue = upper;
lowerValue = lower;
} catch (Exception ex) {
throw new OMException(
"The ack range does not have proper long values for Upper and Lower attributes");
}
acknowledgementRangeElement = factory.createOMElement(
Sandesha2Constants.WSRM.ACK_RANGE, rmNamespace);