Package com.microsoft.windowsazure.management.websites.models

Examples of com.microsoft.windowsazure.management.websites.models.WebSiteGetConfigurationResponse


                }
                throw ex;
            }
           
            // Create Result
            WebSiteGetConfigurationResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new WebSiteGetConfigurationResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element siteConfigElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "SiteConfig");
            if (siteConfigElement != null) {
                Element appSettingsSequenceElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "AppSettings");
                if (appSettingsSequenceElement != null) {
                    for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(appSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "NameValuePair").size(); i1 = i1 + 1) {
                        org.w3c.dom.Element appSettingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(appSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "NameValuePair").get(i1));
                        String appSettingsKey = XmlUtility.getElementByTagNameNS(appSettingsElement, "http://schemas.microsoft.com/windowsazure", "Name").getTextContent();
                        String appSettingsValue = XmlUtility.getElementByTagNameNS(appSettingsElement, "http://schemas.microsoft.com/windowsazure", "Value").getTextContent();
                        result.getAppSettings().put(appSettingsKey, appSettingsValue);
                    }
                }
               
                Element connectionStringsSequenceElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "ConnectionStrings");
                if (connectionStringsSequenceElement != null) {
                    for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(connectionStringsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConnStringInfo").size(); i2 = i2 + 1) {
                        org.w3c.dom.Element connectionStringsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(connectionStringsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConnStringInfo").get(i2));
                        WebSiteGetConfigurationResponse.ConnectionStringInfo connStringInfoInstance = new WebSiteGetConfigurationResponse.ConnectionStringInfo();
                        result.getConnectionStrings().add(connStringInfoInstance);
                       
                        Element connectionStringElement = XmlUtility.getElementByTagNameNS(connectionStringsElement, "http://schemas.microsoft.com/windowsazure", "ConnectionString");
                        if (connectionStringElement != null) {
                            String connectionStringInstance;
                            connectionStringInstance = connectionStringElement.getTextContent();
                            connStringInfoInstance.setConnectionString(connectionStringInstance);
                        }
                       
                        Element nameElement = XmlUtility.getElementByTagNameNS(connectionStringsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                        if (nameElement != null) {
                            String nameInstance;
                            nameInstance = nameElement.getTextContent();
                            connStringInfoInstance.setName(nameInstance);
                        }
                       
                        Element typeElement = XmlUtility.getElementByTagNameNS(connectionStringsElement, "http://schemas.microsoft.com/windowsazure", "Type");
                        if (typeElement != null) {
                            String typeInstance;
                            typeInstance = typeElement.getTextContent();
                            connStringInfoInstance.setType(typeInstance);
                        }
                    }
                }
               
                Element defaultDocumentsSequenceElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "DefaultDocuments");
                if (defaultDocumentsSequenceElement != null) {
                    for (int i3 = 0; i3 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(defaultDocumentsSequenceElement, "http://schemas.microsoft.com/2003/10/Serialization/Arrays", "string").size(); i3 = i3 + 1) {
                        org.w3c.dom.Element defaultDocumentsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(defaultDocumentsSequenceElement, "http://schemas.microsoft.com/2003/10/Serialization/Arrays", "string").get(i3));
                        result.getDefaultDocuments().add(defaultDocumentsElement.getTextContent());
                    }
                }
               
                Element detailedErrorLoggingEnabledElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "DetailedErrorLoggingEnabled");
                if (detailedErrorLoggingEnabledElement != null && (detailedErrorLoggingEnabledElement.getTextContent() == null || detailedErrorLoggingEnabledElement.getTextContent().isEmpty() == true) == false) {
                    boolean detailedErrorLoggingEnabledInstance;
                    detailedErrorLoggingEnabledInstance = DatatypeConverter.parseBoolean(detailedErrorLoggingEnabledElement.getTextContent().toLowerCase());
                    result.setDetailedErrorLoggingEnabled(detailedErrorLoggingEnabledInstance);
                }
               
                Element documentRootElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "DocumentRoot");
                if (documentRootElement != null) {
                    String documentRootInstance;
                    documentRootInstance = documentRootElement.getTextContent();
                    result.setDocumentRoot(documentRootInstance);
                }
               
                Element handlerMappingsSequenceElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "HandlerMappings");
                if (handlerMappingsSequenceElement != null) {
                    for (int i4 = 0; i4 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(handlerMappingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "HandlerMapping").size(); i4 = i4 + 1) {
                        org.w3c.dom.Element handlerMappingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(handlerMappingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "HandlerMapping").get(i4));
                        WebSiteGetConfigurationResponse.HandlerMapping handlerMappingInstance = new WebSiteGetConfigurationResponse.HandlerMapping();
                        result.getHandlerMappings().add(handlerMappingInstance);
                       
                        Element argumentsElement = XmlUtility.getElementByTagNameNS(handlerMappingsElement, "http://schemas.microsoft.com/windowsazure", "Arguments");
                        if (argumentsElement != null) {
                            String argumentsInstance;
                            argumentsInstance = argumentsElement.getTextContent();
                            handlerMappingInstance.setArguments(argumentsInstance);
                        }
                       
                        Element extensionElement = XmlUtility.getElementByTagNameNS(handlerMappingsElement, "http://schemas.microsoft.com/windowsazure", "Extension");
                        if (extensionElement != null) {
                            String extensionInstance;
                            extensionInstance = extensionElement.getTextContent();
                            handlerMappingInstance.setExtension(extensionInstance);
                        }
                       
                        Element scriptProcessorElement = XmlUtility.getElementByTagNameNS(handlerMappingsElement, "http://schemas.microsoft.com/windowsazure", "ScriptProcessor");
                        if (scriptProcessorElement != null) {
                            String scriptProcessorInstance;
                            scriptProcessorInstance = scriptProcessorElement.getTextContent();
                            handlerMappingInstance.setScriptProcessor(scriptProcessorInstance);
                        }
                    }
                }
               
                Element httpLoggingEnabledElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "HttpLoggingEnabled");
                if (httpLoggingEnabledElement != null && (httpLoggingEnabledElement.getTextContent() == null || httpLoggingEnabledElement.getTextContent().isEmpty() == true) == false) {
                    boolean httpLoggingEnabledInstance;
                    httpLoggingEnabledInstance = DatatypeConverter.parseBoolean(httpLoggingEnabledElement.getTextContent().toLowerCase());
                    result.setHttpLoggingEnabled(httpLoggingEnabledInstance);
                }
               
                Element logsDirectorySizeLimitElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "LogsDirectorySizeLimit");
                if (logsDirectorySizeLimitElement != null && (logsDirectorySizeLimitElement.getTextContent() == null || logsDirectorySizeLimitElement.getTextContent().isEmpty() == true) == false) {
                    int logsDirectorySizeLimitInstance;
                    logsDirectorySizeLimitInstance = DatatypeConverter.parseInt(logsDirectorySizeLimitElement.getTextContent());
                    result.setLogsDirectorySizeLimit(logsDirectorySizeLimitInstance);
                }
               
                Element managedPipelineModeElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "ManagedPipelineMode");
                if (managedPipelineModeElement != null && (managedPipelineModeElement.getTextContent() == null || managedPipelineModeElement.getTextContent().isEmpty() == true) == false) {
                    ManagedPipelineMode managedPipelineModeInstance;
                    managedPipelineModeInstance = ManagedPipelineMode.valueOf(managedPipelineModeElement.getTextContent());
                    result.setManagedPipelineMode(managedPipelineModeInstance);
                }
               
                Element metadataSequenceElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "Metadata");
                if (metadataSequenceElement != null) {
                    for (int i5 = 0; i5 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(metadataSequenceElement, "http://schemas.microsoft.com/windowsazure", "NameValuePair").size(); i5 = i5 + 1) {
                        org.w3c.dom.Element metadataElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(metadataSequenceElement, "http://schemas.microsoft.com/windowsazure", "NameValuePair").get(i5));
                        String metadataKey = XmlUtility.getElementByTagNameNS(metadataElement, "http://schemas.microsoft.com/windowsazure", "Name").getTextContent();
                        String metadataValue = XmlUtility.getElementByTagNameNS(metadataElement, "http://schemas.microsoft.com/windowsazure", "Value").getTextContent();
                        result.getMetadata().put(metadataKey, metadataValue);
                    }
                }
               
                Element netFrameworkVersionElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "NetFrameworkVersion");
                if (netFrameworkVersionElement != null) {
                    String netFrameworkVersionInstance;
                    netFrameworkVersionInstance = netFrameworkVersionElement.getTextContent();
                    result.setNetFrameworkVersion(netFrameworkVersionInstance);
                }
               
                Element numberOfWorkersElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "NumberOfWorkers");
                if (numberOfWorkersElement != null && (numberOfWorkersElement.getTextContent() == null || numberOfWorkersElement.getTextContent().isEmpty() == true) == false) {
                    int numberOfWorkersInstance;
                    numberOfWorkersInstance = DatatypeConverter.parseInt(numberOfWorkersElement.getTextContent());
                    result.setNumberOfWorkers(numberOfWorkersInstance);
                }
               
                Element phpVersionElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "PhpVersion");
                if (phpVersionElement != null) {
                    String phpVersionInstance;
                    phpVersionInstance = phpVersionElement.getTextContent();
                    result.setPhpVersion(phpVersionInstance);
                }
               
                Element publishingPasswordElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "PublishingPassword");
                if (publishingPasswordElement != null) {
                    String publishingPasswordInstance;
                    publishingPasswordInstance = publishingPasswordElement.getTextContent();
                    result.setPublishingPassword(publishingPasswordInstance);
                }
               
                Element publishingUsernameElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "PublishingUsername");
                if (publishingUsernameElement != null) {
                    String publishingUsernameInstance;
                    publishingUsernameInstance = publishingUsernameElement.getTextContent();
                    result.setPublishingUserName(publishingUsernameInstance);
                }
               
                Element remoteDebuggingEnabledElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "RemoteDebuggingEnabled");
                if (remoteDebuggingEnabledElement != null && (remoteDebuggingEnabledElement.getTextContent() == null || remoteDebuggingEnabledElement.getTextContent().isEmpty() == true) == false) {
                    boolean remoteDebuggingEnabledInstance;
                    remoteDebuggingEnabledInstance = DatatypeConverter.parseBoolean(remoteDebuggingEnabledElement.getTextContent().toLowerCase());
                    result.setRemoteDebuggingEnabled(remoteDebuggingEnabledInstance);
                }
               
                Element remoteDebuggingVersionElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "RemoteDebuggingVersion");
                if (remoteDebuggingVersionElement != null && (remoteDebuggingVersionElement.getTextContent() == null || remoteDebuggingVersionElement.getTextContent().isEmpty() == true) == false) {
                    boolean isNil = false;
                    Attr nilAttribute = remoteDebuggingVersionElement.getAttributeNodeNS("http://www.w3.org/2001/XMLSchema-instance", "nil");
                    if (nilAttribute != null) {
                        isNil = "true".equals(nilAttribute.getValue());
                    }
                    if (isNil == false) {
                        RemoteDebuggingVersion remoteDebuggingVersionInstance;
                        remoteDebuggingVersionInstance = RemoteDebuggingVersion.valueOf(remoteDebuggingVersionElement.getTextContent());
                        result.setRemoteDebuggingVersion(remoteDebuggingVersionInstance);
                    }
                }
               
                Element requestTracingEnabledElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "RequestTracingEnabled");
                if (requestTracingEnabledElement != null && (requestTracingEnabledElement.getTextContent() == null || requestTracingEnabledElement.getTextContent().isEmpty() == true) == false) {
                    boolean requestTracingEnabledInstance;
                    requestTracingEnabledInstance = DatatypeConverter.parseBoolean(requestTracingEnabledElement.getTextContent().toLowerCase());
                    result.setRequestTracingEnabled(requestTracingEnabledInstance);
                }
               
                Element requestTracingExpirationTimeElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "RequestTracingExpirationTime");
                if (requestTracingExpirationTimeElement != null && (requestTracingExpirationTimeElement.getTextContent() == null || requestTracingExpirationTimeElement.getTextContent().isEmpty() == true) == false) {
                    boolean isNil2 = false;
                    Attr nilAttribute2 = requestTracingExpirationTimeElement.getAttributeNodeNS("http://www.w3.org/2001/XMLSchema-instance", "nil");
                    if (nilAttribute2 != null) {
                        isNil2 = "true".equals(nilAttribute2.getValue());
                    }
                    if (isNil2 == false) {
                        Calendar requestTracingExpirationTimeInstance;
                        requestTracingExpirationTimeInstance = DatatypeConverter.parseDateTime(requestTracingExpirationTimeElement.getTextContent());
                        result.setRequestTracingExpirationTime(requestTracingExpirationTimeInstance);
                    }
                }
               
                Element scmTypeElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "ScmType");
                if (scmTypeElement != null) {
                    String scmTypeInstance;
                    scmTypeInstance = scmTypeElement.getTextContent();
                    result.setScmType(scmTypeInstance);
                }
               
                Element use32BitWorkerProcessElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "Use32BitWorkerProcess");
                if (use32BitWorkerProcessElement != null && (use32BitWorkerProcessElement.getTextContent() == null || use32BitWorkerProcessElement.getTextContent().isEmpty() == true) == false) {
                    boolean use32BitWorkerProcessInstance;
                    use32BitWorkerProcessInstance = DatatypeConverter.parseBoolean(use32BitWorkerProcessElement.getTextContent().toLowerCase());
                    result.setUse32BitWorkerProcess(use32BitWorkerProcessInstance);
                }
               
                Element webSocketsEnabledElement = XmlUtility.getElementByTagNameNS(siteConfigElement, "http://schemas.microsoft.com/windowsazure", "WebSocketsEnabled");
                if (webSocketsEnabledElement != null && (webSocketsEnabledElement.getTextContent() == null || webSocketsEnabledElement.getTextContent().isEmpty() == true) == false) {
                    boolean webSocketsEnabledInstance;
                    webSocketsEnabledInstance = DatatypeConverter.parseBoolean(webSocketsEnabledElement.getTextContent().toLowerCase());
                    result.setWebSocketsEnabled(webSocketsEnabledInstance);
                }
            }
           
            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.websites.models.WebSiteGetConfigurationResponse

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.