Element serviceResourcesSequenceElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "ServiceResources");
if (serviceResourcesSequenceElement != null) {
for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(serviceResourcesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ServiceResource").size(); i1 = i1 + 1) {
org.w3c.dom.Element serviceResourcesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(serviceResourcesSequenceElement, "http://schemas.microsoft.com/windowsazure", "ServiceResource").get(i1));
DatabaseOperation serviceResourceInstance = new DatabaseOperation();
result.getDatabaseOperations().add(serviceResourceInstance);
Element idElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "Id");
if (idElement != null) {
String idInstance;
idInstance = idElement.getTextContent();
serviceResourceInstance.setId(idInstance);
}
Element stateIdElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "StateId");
if (stateIdElement != null) {
int stateIdInstance;
stateIdInstance = DatatypeConverter.parseInt(stateIdElement.getTextContent());
serviceResourceInstance.setStateId(stateIdInstance);
}
Element sessionActivityIdElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "SessionActivityId");
if (sessionActivityIdElement != null) {
String sessionActivityIdInstance;
sessionActivityIdInstance = sessionActivityIdElement.getTextContent();
serviceResourceInstance.setSessionActivityId(sessionActivityIdInstance);
}
Element databaseNameElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "DatabaseName");
if (databaseNameElement != null) {
String databaseNameInstance;
databaseNameInstance = databaseNameElement.getTextContent();
serviceResourceInstance.setDatabaseName(databaseNameInstance);
}
Element percentCompleteElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "PercentComplete");
if (percentCompleteElement != null) {
int percentCompleteInstance;
percentCompleteInstance = DatatypeConverter.parseInt(percentCompleteElement.getTextContent());
serviceResourceInstance.setPercentComplete(percentCompleteInstance);
}
Element errorCodeElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "ErrorCode");
if (errorCodeElement != null) {
int errorCodeInstance;
errorCodeInstance = DatatypeConverter.parseInt(errorCodeElement.getTextContent());
serviceResourceInstance.setErrorCode(errorCodeInstance);
}
Element errorElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "Error");
if (errorElement != null) {
String errorInstance;
errorInstance = errorElement.getTextContent();
serviceResourceInstance.setError(errorInstance);
}
Element errorSeverityElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "ErrorSeverity");
if (errorSeverityElement != null) {
int errorSeverityInstance;
errorSeverityInstance = DatatypeConverter.parseInt(errorSeverityElement.getTextContent());
serviceResourceInstance.setErrorSeverity(errorSeverityInstance);
}
Element errorStateElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "ErrorState");
if (errorStateElement != null) {
int errorStateInstance;
errorStateInstance = DatatypeConverter.parseInt(errorStateElement.getTextContent());
serviceResourceInstance.setErrorState(errorStateInstance);
}
Element startTimeElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "StartTime");
if (startTimeElement != null) {
Calendar startTimeInstance;
startTimeInstance = DatatypeConverter.parseDateTime(startTimeElement.getTextContent());
serviceResourceInstance.setStartTime(startTimeInstance);
}
Element lastModifyTimeElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "LastModifyTime");
if (lastModifyTimeElement != null) {
Calendar lastModifyTimeInstance;
lastModifyTimeInstance = DatatypeConverter.parseDateTime(lastModifyTimeElement.getTextContent());
serviceResourceInstance.setLastModifyTime(lastModifyTimeInstance);
}
Element nameElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "Name");
if (nameElement != null) {
String nameInstance;
nameInstance = nameElement.getTextContent();
serviceResourceInstance.setName(nameInstance);
}
Element typeElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "Type");
if (typeElement != null) {
String typeInstance;
typeInstance = typeElement.getTextContent();
serviceResourceInstance.setType(typeInstance);
}
Element stateElement = XmlUtility.getElementByTagNameNS(serviceResourcesElement, "http://schemas.microsoft.com/windowsazure", "State");
if (stateElement != null) {
String stateInstance;
stateInstance = stateElement.getTextContent();
serviceResourceInstance.setState(stateInstance);
}
}
}
result.setStatusCode(statusCode);