* @param soapMessage soap message from which object will be deserialized
*/
public final void deserialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
throws RMException
{
RMSequence o = (RMSequence)object;
try
{
SOAPHeader soapHeader = soapMessage.getSOAPPart().getEnvelope().getHeader();
RMConstants wsrmConstants = provider.getConstants();
// read required wsrm:Sequence element
QName sequenceQName = wsrmConstants.getSequenceQName();
SOAPElement sequenceElement = getRequiredElement(soapHeader, sequenceQName, "soap header");
// read required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(sequenceElement, identifierQName, sequenceQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
o.setIdentifier(identifier);
// read required wsrm:MessageNumber element
QName messageNumberQName = wsrmConstants.getMessageNumberQName();
SOAPElement messageNumberElement = getRequiredElement(sequenceElement, messageNumberQName, sequenceQName);
String messageNumberString = getRequiredTextContent(messageNumberElement, messageNumberQName);
long messageNumberValue = stringToLong(messageNumberString, "Unable to parse MessageNumber element text content");
o.setMessageNumber(messageNumberValue);
// read optional wsrm:LastMessage element
QName lastMessageQName = wsrmConstants.getLastMessageQName();
SOAPElement lastMessageElement = getOptionalElement(sequenceElement, lastMessageQName, sequenceQName);
if (lastMessageElement != null)
{
o.setLastMessage();
}
}
catch (SOAPException se)
{
throw new RMException("Unable to deserialize RM message", se);