* @param soapMessage soap message from which object will be deserialized
*/
public final void deserialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
throws RMException
{
RMTerminateSequence o = (RMTerminateSequence)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
RMConstants wsrmConstants = provider.getConstants();
// read required wsrm:TerminateSequence element
QName terminateSequenceQName = wsrmConstants.getTerminateSequenceQName();
SOAPElement terminateSequenceElement = getRequiredElement(soapBody, terminateSequenceQName, "soap body");
// read required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(terminateSequenceElement, identifierQName, terminateSequenceQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
o.setIdentifier(identifier);
// read optional wsrm:LastMsgNumber element
QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
SOAPElement lastMsgNumberElement = getOptionalElement(terminateSequenceElement, lastMsgNumberQName, terminateSequenceQName);
if (lastMsgNumberElement != null)
{
String lastMsgNumberString = getRequiredTextContent(lastMsgNumberElement, lastMsgNumberQName);
long lastMsgNumberValue = stringToLong(lastMsgNumberString, "Unable to parse LastMsgNumber element text content");
o.setLastMsgNumber(lastMsgNumberValue);
}
}
catch (SOAPException se)
{
throw new RMException("Unable to deserialize RM message", se);