* @param soapMessage soap message from which object will be deserialized
*/
public final void deserialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
throws RMException
{
RMCreateSequenceResponse o = (RMCreateSequenceResponse)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
RMConstants wsrmConstants = provider.getConstants();
// read required wsrm:CreateSequenceResponse element
QName createSequenceResponseQName = wsrmConstants.getCreateSequenceResponseQName();
SOAPElement createSequenceResponseElement = getRequiredElement(soapBody, createSequenceResponseQName, "soap body");
// read required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(createSequenceResponseElement, identifierQName, createSequenceResponseQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
o.setIdentifier(identifier);
// read optional wsrm:Expires element
QName expiresQName = wsrmConstants.getExpiresQName();
SOAPElement expiresElement = getOptionalElement(createSequenceResponseElement, expiresQName, createSequenceResponseQName);
if (expiresElement != null)
{
String duration = getRequiredTextContent(expiresElement, expiresQName);
o.setExpires(RMHelper.stringToDuration(duration));
}
// read optional wsrm:IncompleteSequenceBehavior element
QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
SOAPElement behaviorElement = getOptionalElement(createSequenceResponseElement, behaviorQName, createSequenceResponseQName);
if (behaviorElement != null)
{
String behaviorString = getRequiredTextContent(behaviorElement, behaviorQName);
o.setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior.getValue(behaviorString));
}
// read optional wsrm:Accept element
QName acceptQName = wsrmConstants.getAcceptQName();
SOAPElement acceptElement = getOptionalElement(createSequenceResponseElement, acceptQName, createSequenceResponseQName);
if (acceptElement != null)
{
RMCreateSequenceResponse.RMAccept accept = o.newAccept();
// read required wsrm:AcksTo element
QName acksToQName = wsrmConstants.getAcksToQName();
SOAPElement acksToElement = getRequiredElement(acceptElement, acksToQName, acceptQName);
QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
SOAPElement acksToAddressElement = getRequiredElement(acksToElement, addressQName, acksToQName);
String acksToAddress = getRequiredTextContent(acksToAddressElement, addressQName);
accept.setAcksTo(acksToAddress);
// set created accept
o.setAccept(accept);
}
}
catch (SOAPException se)
{
throw new RMException("Unable to deserialize RM message", se);