Package com.microsoft.windowsazure.management.servicebus.models

Examples of com.microsoft.windowsazure.management.servicebus.models.ServiceBusAuthorizationRuleResponse


                }
                throw ex;
            }
           
            // Create Result
            ServiceBusAuthorizationRuleResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new ServiceBusAuthorizationRuleResponse();
            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 contentElement2 = XmlUtility.getElementByTagNameNS(entryElement2, "http://www.w3.org/2005/Atom", "content");
                if (contentElement2 != null) {
                    Element sharedAccessAuthorizationRuleElement2 = XmlUtility.getElementByTagNameNS(contentElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SharedAccessAuthorizationRule");
                    if (sharedAccessAuthorizationRuleElement2 != null) {
                        ServiceBusSharedAccessAuthorizationRule sharedAccessAuthorizationRuleInstance = new ServiceBusSharedAccessAuthorizationRule();
                        result.setAuthorizationRule(sharedAccessAuthorizationRuleInstance);
                       
                        Element claimTypeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimType");
                        if (claimTypeElement2 != null) {
                            String claimTypeInstance;
                            claimTypeInstance = claimTypeElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimType(claimTypeInstance);
                        }
                       
                        Element claimValueElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimValue");
                        if (claimValueElement2 != null) {
                            String claimValueInstance;
                            claimValueInstance = claimValueElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimValue(claimValueInstance);
                        }
                       
                        Element rightsSequenceElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Rights");
                        if (rightsSequenceElement2 != null) {
                            for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").size(); i1 = i1 + 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(i1));
                                sharedAccessAuthorizationRuleInstance.getRights().add(AccessRight.valueOf(rightsElement.getTextContent()));
                            }
                        }
                       
                        Element createdTimeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedTime");
                        if (createdTimeElement2 != null) {
                            Calendar createdTimeInstance;
                            createdTimeInstance = DatatypeConverter.parseDateTime(createdTimeElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setCreatedTime(createdTimeInstance);
                        }
                       
                        Element modifiedTimeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ModifiedTime");
                        if (modifiedTimeElement2 != null) {
                            Calendar modifiedTimeInstance;
                            modifiedTimeInstance = DatatypeConverter.parseDateTime(modifiedTimeElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setModifiedTime(modifiedTimeInstance);
                        }
                       
                        Element keyNameElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "KeyName");
                        if (keyNameElement2 != null) {
                            String keyNameInstance;
                            keyNameInstance = keyNameElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setKeyName(keyNameInstance);
                        }
                       
                        Element primaryKeyElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "PrimaryKey");
                        if (primaryKeyElement2 != null) {
                            String primaryKeyInstance;
                            primaryKeyInstance = primaryKeyElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setPrimaryKey(primaryKeyInstance);
                        }
                       
                        Element secondaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SecondaryKey");
                        if (secondaryKeyElement != null) {
                            String secondaryKeyInstance;
                            secondaryKeyInstance = secondaryKeyElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setSecondaryKey(secondaryKeyInstance);
                        }
                       
                        Element revisionElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Revision");
                        if (revisionElement2 != null) {
                            int revisionInstance;
                            revisionInstance = DatatypeConverter.parseInt(revisionElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setRevision(revisionInstance);
                        }
                    }
                }
            }
           
            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);
            }
View Full Code Here


                }
                throw ex;
            }
           
            // Create Result
            ServiceBusAuthorizationRuleResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new ServiceBusAuthorizationRuleResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element entryElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://www.w3.org/2005/Atom", "entry");
            if (entryElement != null) {
                Element contentElement = XmlUtility.getElementByTagNameNS(entryElement, "http://www.w3.org/2005/Atom", "content");
                if (contentElement != null) {
                    Element sharedAccessAuthorizationRuleElement = XmlUtility.getElementByTagNameNS(contentElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SharedAccessAuthorizationRule");
                    if (sharedAccessAuthorizationRuleElement != null) {
                        ServiceBusSharedAccessAuthorizationRule sharedAccessAuthorizationRuleInstance = new ServiceBusSharedAccessAuthorizationRule();
                        result.setAuthorizationRule(sharedAccessAuthorizationRuleInstance);
                       
                        Element claimTypeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimType");
                        if (claimTypeElement != null) {
                            String claimTypeInstance;
                            claimTypeInstance = claimTypeElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimType(claimTypeInstance);
                        }
                       
                        Element claimValueElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimValue");
                        if (claimValueElement != null) {
                            String claimValueInstance;
                            claimValueInstance = claimValueElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimValue(claimValueInstance);
                        }
                       
                        Element rightsSequenceElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Rights");
                        if (rightsSequenceElement != null) {
                            for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").size(); i1 = i1 + 1) {
                                org.w3c.dom.Element rightsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").get(i1));
                                sharedAccessAuthorizationRuleInstance.getRights().add(AccessRight.valueOf(rightsElement.getTextContent()));
                            }
                        }
                       
                        Element createdTimeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedTime");
                        if (createdTimeElement != null) {
                            Calendar createdTimeInstance;
                            createdTimeInstance = DatatypeConverter.parseDateTime(createdTimeElement.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setCreatedTime(createdTimeInstance);
                        }
                       
                        Element modifiedTimeElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ModifiedTime");
                        if (modifiedTimeElement != null) {
                            Calendar modifiedTimeInstance;
                            modifiedTimeInstance = DatatypeConverter.parseDateTime(modifiedTimeElement.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setModifiedTime(modifiedTimeInstance);
                        }
                       
                        Element keyNameElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "KeyName");
                        if (keyNameElement != null) {
                            String keyNameInstance;
                            keyNameInstance = keyNameElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setKeyName(keyNameInstance);
                        }
                       
                        Element primaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "PrimaryKey");
                        if (primaryKeyElement != null) {
                            String primaryKeyInstance;
                            primaryKeyInstance = primaryKeyElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setPrimaryKey(primaryKeyInstance);
                        }
                       
                        Element secondaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SecondaryKey");
                        if (secondaryKeyElement != null) {
                            String secondaryKeyInstance;
                            secondaryKeyInstance = secondaryKeyElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setSecondaryKey(secondaryKeyInstance);
                        }
                       
                        Element revisionElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Revision");
                        if (revisionElement != null) {
                            int revisionInstance;
                            revisionInstance = DatatypeConverter.parseInt(revisionElement.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setRevision(revisionInstance);
                        }
                    }
                }
            }
           
            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);
            }
View Full Code Here

                }
                throw ex;
            }
           
            // Create Result
            ServiceBusAuthorizationRuleResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new ServiceBusAuthorizationRuleResponse();
            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 contentElement2 = XmlUtility.getElementByTagNameNS(entryElement2, "http://www.w3.org/2005/Atom", "content");
                if (contentElement2 != null) {
                    Element sharedAccessAuthorizationRuleElement2 = XmlUtility.getElementByTagNameNS(contentElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SharedAccessAuthorizationRule");
                    if (sharedAccessAuthorizationRuleElement2 != null) {
                        ServiceBusSharedAccessAuthorizationRule sharedAccessAuthorizationRuleInstance = new ServiceBusSharedAccessAuthorizationRule();
                        result.setAuthorizationRule(sharedAccessAuthorizationRuleInstance);
                       
                        Element claimTypeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimType");
                        if (claimTypeElement2 != null) {
                            String claimTypeInstance;
                            claimTypeInstance = claimTypeElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimType(claimTypeInstance);
                        }
                       
                        Element claimValueElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ClaimValue");
                        if (claimValueElement2 != null) {
                            String claimValueInstance;
                            claimValueInstance = claimValueElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setClaimValue(claimValueInstance);
                        }
                       
                        Element rightsSequenceElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Rights");
                        if (rightsSequenceElement2 != null) {
                            for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rightsSequenceElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "AccessRights").size(); i1 = i1 + 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(i1));
                                sharedAccessAuthorizationRuleInstance.getRights().add(AccessRight.valueOf(rightsElement.getTextContent()));
                            }
                        }
                       
                        Element createdTimeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "CreatedTime");
                        if (createdTimeElement2 != null) {
                            Calendar createdTimeInstance;
                            createdTimeInstance = DatatypeConverter.parseDateTime(createdTimeElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setCreatedTime(createdTimeInstance);
                        }
                       
                        Element modifiedTimeElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "ModifiedTime");
                        if (modifiedTimeElement2 != null) {
                            Calendar modifiedTimeInstance;
                            modifiedTimeInstance = DatatypeConverter.parseDateTime(modifiedTimeElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setModifiedTime(modifiedTimeInstance);
                        }
                       
                        Element keyNameElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "KeyName");
                        if (keyNameElement2 != null) {
                            String keyNameInstance;
                            keyNameInstance = keyNameElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setKeyName(keyNameInstance);
                        }
                       
                        Element primaryKeyElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "PrimaryKey");
                        if (primaryKeyElement2 != null) {
                            String primaryKeyInstance;
                            primaryKeyInstance = primaryKeyElement2.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setPrimaryKey(primaryKeyInstance);
                        }
                       
                        Element secondaryKeyElement = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "SecondaryKey");
                        if (secondaryKeyElement != null) {
                            String secondaryKeyInstance;
                            secondaryKeyInstance = secondaryKeyElement.getTextContent();
                            sharedAccessAuthorizationRuleInstance.setSecondaryKey(secondaryKeyInstance);
                        }
                       
                        Element revisionElement2 = XmlUtility.getElementByTagNameNS(sharedAccessAuthorizationRuleElement2, "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect", "Revision");
                        if (revisionElement2 != null) {
                            int revisionInstance;
                            revisionInstance = DatatypeConverter.parseInt(revisionElement2.getTextContent());
                            sharedAccessAuthorizationRuleInstance.setRevision(revisionInstance);
                        }
                    }
                }
            }
           
            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);
            }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.management.servicebus.models.ServiceBusAuthorizationRuleResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.