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

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


    }

    @Test
    public void listPublishingUsersSuccess() throws Exception {
        // Act
        WebSpacesListPublishingUsersResponse webSpacesListPublishingUsersResponse = webSiteManagementClient.getWebSpacesOperations().listPublishingUsers();

        // Assert
        Assert.assertEquals(200,   webSpacesListPublishingUsersResponse.getStatusCode());
        Assert.assertNotNull( webSpacesListPublishingUsersResponse.getRequestId());

        ArrayList< WebSpacesListPublishingUsersResponse.User> userlist =  webSpacesListPublishingUsersResponse.getUsers();
        for (WebSpacesListPublishingUsersResponse.User user : userlist) {
             Assert.assertNotNull(user.getName());
        }
    }
View Full Code Here


                }
                throw ex;
            }
           
            // Create Result
            WebSpacesListPublishingUsersResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new WebSpacesListPublishingUsersResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element arrayOfstringSequenceElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/2003/10/Serialization/Arrays", "ArrayOfstring");
            if (arrayOfstringSequenceElement != null) {
                for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(arrayOfstringSequenceElement, "http://schemas.microsoft.com/2003/10/Serialization/Arrays", "string").size(); i1 = i1 + 1) {
                    org.w3c.dom.Element arrayOfstringElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(arrayOfstringSequenceElement, "http://schemas.microsoft.com/2003/10/Serialization/Arrays", "string").get(i1));
                    WebSpacesListPublishingUsersResponse.User stringInstance = new WebSpacesListPublishingUsersResponse.User();
                    result.getUsers().add(stringInstance);
                   
                    String stringInstance2;
                    stringInstance2 = arrayOfstringElement.getTextContent();
                    stringInstance.setName(stringInstance2);
                }
            }
           
            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.WebSpacesListPublishingUsersResponse

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.