autodiscover config

This commit is contained in:
Peter Hormanns 2019-12-06 19:29:05 +01:00
parent b4b27bda7d
commit 273f45609a
2 changed files with 5 additions and 20 deletions

View File

@ -64,6 +64,11 @@
<url-pattern>/config-v1.1.xml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AutoconfigServlet</servlet-name>
<url-pattern>/autodiscover.xml</url-pattern>
</servlet-mapping>
<!--
<servlet-mapping>
<servlet-name>Queue PacTasks Servlet</servlet-name>

View File

@ -126,23 +126,6 @@ public class AutoconfigAutodiscoverServlet extends HttpServlet {
}
}
// public static void main(String[] args) {
// final DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
// final String mbox = "xyz00-test";
// try {
// final Document document = buildAutodiscoverDocument(builderFactory, mbox);
// final TransformerFactory transformerFactory = TransformerFactory.newInstance();
// final Transformer transformer = transformerFactory.newTransformer();
// transformer.transform(new DOMSource(document), new StreamResult(System.out));
// } catch (ParserConfigurationException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// } catch (TransformerException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
private static Document buildAutodiscoverDocument(final DocumentBuilderFactory builderFactory, String uniqueMailbox)
throws ParserConfigurationException {
DocumentBuilder builder;
@ -155,9 +138,6 @@ public class AutoconfigAutodiscoverServlet extends HttpServlet {
document.appendChild(autodiscover);
final Element response = document.createElementNS("http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a", "Response");
autodiscover.appendChild(response);
final Element user = document.createElement("User");
response.appendChild(user);
appendElementWithText(document, user, "DisplayName", pacDomain);
final Element account = document.createElement("Account");
response.appendChild(account);
appendElementWithText(document, account, "AccountType", "email");