final String serviceVersion = getOptionalElementText(
serviceDescriptionNode,
ConfigurationFileTagsV1.VERSION_ELEMENT);
final Tool toolDescription = getToolDescriptionElement(serviceDescriptionNode);
// Get the migration service identifier or create an identifier if
// it has not been specified in the configuration document.
String identifier = getOptionalElementText(serviceDescriptionNode,
ConfigurationFileTagsV1.IDENTIFIER_ELEMENT);
if (identifier == null || "".equals(identifier)) {
// Construct an identifier in the form of a MD5 digest of
// the tool ID, the canonical class name of the migration
// service and its version number.
try {
final MessageDigest identDigest = MessageDigest
.getInstance("MD5");
identDigest.update(this.canonicalServiceName.getBytes());
final String versionInfo = (serviceVersion != null) ? serviceVersion
: "";
identDigest.update(versionInfo.getBytes());
final URI toolIDURI = toolDescription.getIdentifier();
final String toolIdentifier = toolIDURI == null ? ""
: toolIDURI.toString();
identDigest.update(toolIdentifier.getBytes());
final BigInteger md5hash = new BigInteger(identDigest.digest());