Package com.microsoft.windowsazure.management.network.models

Examples of com.microsoft.windowsazure.management.network.models.GatewayListSupportedDevicesResponse


                }
                throw ex;
            }
           
            // Create Result
            GatewayListSupportedDevicesResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new GatewayListSupportedDevicesResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element vpnDeviceListElement = XmlUtility.getElementByTagNameNS(responseDoc, "", "VpnDeviceList");
            if (vpnDeviceListElement != null) {
                Attr versionAttribute = vpnDeviceListElement.getAttributeNodeNS("", "version");
                if (versionAttribute != null) {
                    result.setVersion(versionAttribute.getValue());
                }
               
                if (vpnDeviceListElement != null) {
                    for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(vpnDeviceListElement, "", "Vendor").size(); i1 = i1 + 1) {
                        org.w3c.dom.Element vendorsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(vpnDeviceListElement, "", "Vendor").get(i1));
                        GatewayListSupportedDevicesResponse.Vendor vendorInstance = new GatewayListSupportedDevicesResponse.Vendor();
                        result.getVendors().add(vendorInstance);
                       
                        Attr nameAttribute = vendorsElement.getAttributeNodeNS("", "name");
                        if (nameAttribute != null) {
                            vendorInstance.setName(nameAttribute.getValue());
                        }
                       
                        if (vendorsElement != null) {
                            for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(vendorsElement, "", "Platform").size(); i2 = i2 + 1) {
                                org.w3c.dom.Element platformsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(vendorsElement, "", "Platform").get(i2));
                                GatewayListSupportedDevicesResponse.Platform platformInstance = new GatewayListSupportedDevicesResponse.Platform();
                                vendorInstance.getPlatforms().add(platformInstance);
                               
                                Attr nameAttribute2 = platformsElement.getAttributeNodeNS("", "name");
                                if (nameAttribute2 != null) {
                                    platformInstance.setName(nameAttribute2.getValue());
                                }
                               
                                if (platformsElement != null) {
                                    for (int i3 = 0; i3 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(platformsElement, "", "OSFamily").size(); i3 = i3 + 1) {
                                        org.w3c.dom.Element oSFamiliesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(platformsElement, "", "OSFamily").get(i3));
                                        GatewayListSupportedDevicesResponse.OSFamily oSFamilyInstance = new GatewayListSupportedDevicesResponse.OSFamily();
                                        platformInstance.getOSFamilies().add(oSFamilyInstance);
                                       
                                        Attr nameAttribute3 = oSFamiliesElement.getAttributeNodeNS("", "name");
                                        if (nameAttribute3 != null) {
                                            oSFamilyInstance.setName(nameAttribute3.getValue());
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
           
            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.network.models.GatewayListSupportedDevicesResponse

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.