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

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


//        Assert.assertEquals(3, webSpaceGetResponse.getWorkerSize());
    }

    @Test
    public void getDnsSuffixSuccess() throws Exception {     
        WebSpacesGetDnsSuffixResponse  webSpacesGetDnsSuffixResponse = webSiteManagementClient.getWebSpacesOperations().getDnsSuffix();
        // Assert
        Assert.assertEquals(200, webSpacesGetDnsSuffixResponse.getStatusCode());
        Assert.assertNotNull(webSpacesGetDnsSuffixResponse.getRequestId());
        Assert.assertEquals("azurewebsites.net", webSpacesGetDnsSuffixResponse.getDnsSuffix());
    }
View Full Code Here


                }
                throw ex;
            }
           
            // Create Result
            WebSpacesGetDnsSuffixResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new WebSpacesGetDnsSuffixResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element stringElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/2003/10/Serialization/", "string");
            if (stringElement != null) {
                result.setDnsSuffix(stringElement.getTextContent());
            }
           
            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.WebSpacesGetDnsSuffixResponse

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.