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

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


        createParameters.setName(webSpaceName);
        createParameters.setPublishingUserName(username);
        createParameters.setPublishingPassword(userpassword);
       
        // Act
        WebSpacesCreatePublishingUserResponse webSpaceCreateResponse = webSiteManagementClient.getWebSpacesOperations().createPublishingUser(username, userpassword, createParameters);
       
        // Assert
        Assert.assertEquals(200,  webSpaceCreateResponse.getStatusCode());
        Assert.assertNotNull( webSpaceCreateResponse.getRequestId());
        Assert.assertEquals(webSpaceName, webSpaceCreateResponse.getName());
    }
View Full Code Here


                }
                throw ex;
            }
           
            // Create Result
            WebSpacesCreatePublishingUserResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new WebSpacesCreatePublishingUserResponse();
            DocumentBuilderFactory documentBuilderFactory2 = DocumentBuilderFactory.newInstance();
            documentBuilderFactory2.setNamespaceAware(true);
            DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder();
            Document responseDoc = documentBuilder2.parse(new BOMInputStream(responseContent));
           
            Element userElement2 = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "User");
            if (userElement2 != null) {
                Element nameElement2 = XmlUtility.getElementByTagNameNS(userElement2, "http://schemas.microsoft.com/windowsazure", "Name");
                if (nameElement2 != null) {
                    String nameInstance;
                    nameInstance = nameElement2.getTextContent();
                    result.setName(nameInstance);
                }
               
                Element publishingPasswordElement2 = XmlUtility.getElementByTagNameNS(userElement2, "http://schemas.microsoft.com/windowsazure", "PublishingPassword");
                if (publishingPasswordElement2 != null) {
                    String publishingPasswordInstance;
                    publishingPasswordInstance = publishingPasswordElement2.getTextContent();
                    result.setPublishingPassword(publishingPasswordInstance);
                }
               
                Element publishingUserNameElement2 = XmlUtility.getElementByTagNameNS(userElement2, "http://schemas.microsoft.com/windowsazure", "PublishingUserName");
                if (publishingUserNameElement2 != null) {
                    String publishingUserNameInstance;
                    publishingUserNameInstance = publishingUserNameElement2.getTextContent();
                    result.setPublishingUserName(publishingUserNameInstance);
                }
            }
           
            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.WebSpacesCreatePublishingUserResponse

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.