}
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);
}