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