}
throw ex;
}
// Create Result
ServiceBusTopicResponse result = null;
// Deserialize Response
InputStream responseContent = httpResponse.getEntity().getContent();
result = new ServiceBusTopicResponse();
DocumentBuilderFactory documentBuilderFactory2 = DocumentBuilderFactory.newInstance();
documentBuilderFactory2.setNamespaceAware(true);
DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder();
Document responseDoc = documentBuilder2.parse(new BOMInputStream(responseContent));
Element entryElement2 = XmlUtility.getElementByTagNameNS(responseDoc, "http://www.w3.org/2005/Atom", "entry");
if (entryElement2 != null) {
Element titleElement = XmlUtility.getElementByTagNameNS(entryElement2, "http://www.w3.org/2005/Atom", "title");
if (titleElement != null) {
}
Element contentElement2 = XmlUtility.getElementByTagNameNS(entryElement2, "http://www.w3.org/2005/Atom", "content");
if (contentElement2 != null) {
Element topicDescriptionElement2 = XmlUtility.getElementByTagNameNS(contentElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "TopicDescription");
if (topicDescriptionElement2 != null) {
ServiceBusTopic topicDescriptionInstance = new ServiceBusTopic();
result.setTopic(topicDescriptionInstance);
Element defaultMessageTimeToLiveElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "DefaultMessageTimeToLive");
if (defaultMessageTimeToLiveElement2 != null) {
String defaultMessageTimeToLiveInstance;
defaultMessageTimeToLiveInstance = defaultMessageTimeToLiveElement2.getTextContent();
topicDescriptionInstance.setDefaultMessageTimeToLive(defaultMessageTimeToLiveInstance);
}
Element maxSizeInMegabytesElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "MaxSizeInMegabytes");
if (maxSizeInMegabytesElement2 != null) {
int maxSizeInMegabytesInstance;
maxSizeInMegabytesInstance = DatatypeConverter.parseInt(maxSizeInMegabytesElement2.getTextContent());
topicDescriptionInstance.setMaxSizeInMegabytes(maxSizeInMegabytesInstance);
}
Element requiresDuplicateDetectionElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "RequiresDuplicateDetection");
if (requiresDuplicateDetectionElement2 != null) {
boolean requiresDuplicateDetectionInstance;
requiresDuplicateDetectionInstance = DatatypeConverter.parseBoolean(requiresDuplicateDetectionElement2.getTextContent().toLowerCase());
topicDescriptionInstance.setRequiresDuplicateDetection(requiresDuplicateDetectionInstance);
}
Element duplicateDetectionHistoryTimeWindowElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "DuplicateDetectionHistoryTimeWindow");
if (duplicateDetectionHistoryTimeWindowElement2 != null) {
String duplicateDetectionHistoryTimeWindowInstance;
duplicateDetectionHistoryTimeWindowInstance = duplicateDetectionHistoryTimeWindowElement2.getTextContent();
topicDescriptionInstance.setDuplicateDetectionHistoryTimeWindow(duplicateDetectionHistoryTimeWindowInstance);
}
Element enableBatchedOperationsElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "EnableBatchedOperations");
if (enableBatchedOperationsElement2 != null) {
boolean enableBatchedOperationsInstance;
enableBatchedOperationsInstance = DatatypeConverter.parseBoolean(enableBatchedOperationsElement2.getTextContent().toLowerCase());
topicDescriptionInstance.setEnableBatchedOperations(enableBatchedOperationsInstance);
}
Element sizeInBytesElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SizeInBytes");
if (sizeInBytesElement2 != null) {
int sizeInBytesInstance;
sizeInBytesInstance = DatatypeConverter.parseInt(sizeInBytesElement2.getTextContent());
topicDescriptionInstance.setSizeInBytes(sizeInBytesInstance);
}
Element filteringMessagesBeforePublishingElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "FilteringMessagesBeforePublishing");
if (filteringMessagesBeforePublishingElement2 != null) {
boolean filteringMessagesBeforePublishingInstance;
filteringMessagesBeforePublishingInstance = DatatypeConverter.parseBoolean(filteringMessagesBeforePublishingElement2.getTextContent().toLowerCase());
topicDescriptionInstance.setFilteringMessagesBeforePublishing(filteringMessagesBeforePublishingInstance);
}
Element isAnonymousAccessibleElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "IsAnonymousAccessible");
if (isAnonymousAccessibleElement2 != null) {
boolean isAnonymousAccessibleInstance;
isAnonymousAccessibleInstance = DatatypeConverter.parseBoolean(isAnonymousAccessibleElement2.getTextContent().toLowerCase());
topicDescriptionInstance.setIsAnonymousAccessible(isAnonymousAccessibleInstance);
}
Element authorizationRulesSequenceElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AuthorizationRules");
if (authorizationRulesSequenceElement2 != null) {
for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(authorizationRulesSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AuthorizationRule").size(); i1 = i1 + 1) {
org.w3c.dom.Element authorizationRulesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(authorizationRulesSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AuthorizationRule").get(i1));
ServiceBusSharedAccessAuthorizationRule authorizationRuleInstance = new ServiceBusSharedAccessAuthorizationRule();
topicDescriptionInstance.getAuthorizationRules().add(authorizationRuleInstance);
Element claimTypeElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimType");
if (claimTypeElement2 != null) {
String claimTypeInstance;
claimTypeInstance = claimTypeElement2.getTextContent();
authorizationRuleInstance.setClaimType(claimTypeInstance);
}
Element claimValueElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimValue");
if (claimValueElement2 != null) {
String claimValueInstance;
claimValueInstance = claimValueElement2.getTextContent();
authorizationRuleInstance.setClaimValue(claimValueInstance);
}
Element rightsSequenceElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Rights");
if (rightsSequenceElement2 != null) {
for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").size(); i2 = i2 + 1) {
org.w3c.dom.Element rightsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").get(i2));
authorizationRuleInstance.getRights().add(AccessRight.valueOf(rightsElement.getTextContent()));
}
}
Element createdTimeElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedTime");
if (createdTimeElement2 != null) {
Calendar createdTimeInstance;
createdTimeInstance = DatatypeConverter.parseDateTime(createdTimeElement2.getTextContent());
authorizationRuleInstance.setCreatedTime(createdTimeInstance);
}
Element keyNameElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "KeyName");
if (keyNameElement2 != null) {
String keyNameInstance;
keyNameInstance = keyNameElement2.getTextContent();
authorizationRuleInstance.setKeyName(keyNameInstance);
}
Element modifiedTimeElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ModifiedTime");
if (modifiedTimeElement2 != null) {
Calendar modifiedTimeInstance;
modifiedTimeInstance = DatatypeConverter.parseDateTime(modifiedTimeElement2.getTextContent());
authorizationRuleInstance.setModifiedTime(modifiedTimeInstance);
}
Element primaryKeyElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "PrimaryKey");
if (primaryKeyElement2 != null) {
String primaryKeyInstance;
primaryKeyInstance = primaryKeyElement2.getTextContent();
authorizationRuleInstance.setPrimaryKey(primaryKeyInstance);
}
Element secondaryKeyElement2 = XmlUtility.getElementByTagNameNS(authorizationRulesElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SecondaryKey");
if (secondaryKeyElement2 != null) {
String secondaryKeyInstance;
secondaryKeyInstance = secondaryKeyElement2.getTextContent();
authorizationRuleInstance.setSecondaryKey(secondaryKeyInstance);
}
}
}
Element statusElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Status");
if (statusElement2 != null) {
String statusInstance;
statusInstance = statusElement2.getTextContent();
topicDescriptionInstance.setStatus(statusInstance);
}
Element createdAtElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedAt");
if (createdAtElement2 != null) {
Calendar createdAtInstance;
createdAtInstance = DatatypeConverter.parseDateTime(createdAtElement2.getTextContent());
topicDescriptionInstance.setCreatedAt(createdAtInstance);
}
Element updatedAtElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "UpdatedAt");
if (updatedAtElement2 != null) {
Calendar updatedAtInstance;
updatedAtInstance = DatatypeConverter.parseDateTime(updatedAtElement2.getTextContent());
topicDescriptionInstance.setUpdatedAt(updatedAtInstance);
}
Element accessedAtElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessedAt");
if (accessedAtElement2 != null) {
Calendar accessedAtInstance;
accessedAtInstance = DatatypeConverter.parseDateTime(accessedAtElement2.getTextContent());
topicDescriptionInstance.setAccessedAt(accessedAtInstance);
}
Element supportOrderingElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SupportOrdering");
if (supportOrderingElement2 != null) {
boolean supportOrderingInstance;
supportOrderingInstance = DatatypeConverter.parseBoolean(supportOrderingElement2.getTextContent().toLowerCase());
topicDescriptionInstance.setSupportOrdering(supportOrderingInstance);
}
Element countDetailsElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CountDetails");
if (countDetailsElement2 != null) {
CountDetails countDetailsInstance = new CountDetails();
topicDescriptionInstance.setCountDetails(countDetailsInstance);
}
Element subscriptionCountElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SubscriptionCount");
if (subscriptionCountElement2 != null) {
int subscriptionCountInstance;
subscriptionCountInstance = DatatypeConverter.parseInt(subscriptionCountElement2.getTextContent());
topicDescriptionInstance.setSubscriptionCount(subscriptionCountInstance);
}
Element autoDeleteOnIdleElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AutoDeleteOnIdle");
if (autoDeleteOnIdleElement2 != null) {
String autoDeleteOnIdleInstance;
autoDeleteOnIdleInstance = autoDeleteOnIdleElement2.getTextContent();
topicDescriptionInstance.setAutoDeleteOnIdle(autoDeleteOnIdleInstance);
}
Element entityAvailabilityStatusElement2 = XmlUtility.getElementByTagNameNS(topicDescriptionElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "EntityAvailabilityStatus");
if (entityAvailabilityStatusElement2 != null) {
String entityAvailabilityStatusInstance;
entityAvailabilityStatusInstance = entityAvailabilityStatusElement2.getTextContent();
topicDescriptionInstance.setEntityAvailabilityStatus(entityAvailabilityStatusInstance);
}
}
}
}
result.setStatusCode(statusCode);
if (httpResponse.getHeaders("x-ms-request-id").length > 0) {
result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue());
}
if (shouldTrace) {
CloudTracing.exit(invocationId, result);
}