HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2019-12-06 273f45609ae3da8ae30767df614562ae22617d73
autodiscover config
2 files modified
25 ■■■■ changed files
hsarback/conf/WEB-INF/prod-web.xml 5 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java 20 ●●●●● patch | view | raw | blame | history
hsarback/conf/WEB-INF/prod-web.xml
@@ -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>
hsarback/src/de/hsadmin/autoconfig/AutoconfigAutodiscoverServlet.java
@@ -126,23 +126,6 @@
        }
    }
//    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 @@
        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");