DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder();
Document responseDoc = documentBuilder2.parse(new BOMInputStream(responseContent));
Element serviceResourceElement2 = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "ServiceResource");
if (serviceResourceElement2 != null) {
RestoreDatabaseOperation serviceResourceInstance = new RestoreDatabaseOperation();
result.setOperation(serviceResourceInstance);
Element requestIDElement = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "RequestID");
if (requestIDElement != null) {
String requestIDInstance;
requestIDInstance = requestIDElement.getTextContent();
serviceResourceInstance.setId(requestIDInstance);
}
Element sourceDatabaseNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "SourceDatabaseName");
if (sourceDatabaseNameElement2 != null) {
String sourceDatabaseNameInstance;
sourceDatabaseNameInstance = sourceDatabaseNameElement2.getTextContent();
serviceResourceInstance.setSourceDatabaseName(sourceDatabaseNameInstance);
}
Element sourceDatabaseDeletionDateElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "SourceDatabaseDeletionDate");
if (sourceDatabaseDeletionDateElement2 != null && (sourceDatabaseDeletionDateElement2.getTextContent() == null || sourceDatabaseDeletionDateElement2.getTextContent().isEmpty() == true) == false) {
Calendar sourceDatabaseDeletionDateInstance;
sourceDatabaseDeletionDateInstance = DatatypeConverter.parseDateTime(sourceDatabaseDeletionDateElement2.getTextContent());
serviceResourceInstance.setSourceDatabaseDeletionDate(sourceDatabaseDeletionDateInstance);
}
Element targetServerNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetServerName");
if (targetServerNameElement2 != null) {
String targetServerNameInstance;
targetServerNameInstance = targetServerNameElement2.getTextContent();
serviceResourceInstance.setTargetServerName(targetServerNameInstance);
}
Element targetDatabaseNameElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetDatabaseName");
if (targetDatabaseNameElement2 != null) {
String targetDatabaseNameInstance;
targetDatabaseNameInstance = targetDatabaseNameElement2.getTextContent();
serviceResourceInstance.setTargetDatabaseName(targetDatabaseNameInstance);
}
Element targetUtcPointInTimeElement2 = XmlUtility.getElementByTagNameNS(serviceResourceElement2, "http://schemas.microsoft.com/windowsazure", "TargetUtcPointInTime");
if (targetUtcPointInTimeElement2 != null) {
Calendar targetUtcPointInTimeInstance;
targetUtcPointInTimeInstance = DatatypeConverter.parseDateTime(targetUtcPointInTimeElement2.getTextContent());
serviceResourceInstance.setPointInTime(targetUtcPointInTimeInstance);
}
}
result.setStatusCode(statusCode);
if (httpResponse.getHeaders("x-ms-request-id").length > 0) {