autodiscover config
This commit is contained in:
parent
b4b27bda7d
commit
273f45609a
@ -64,6 +64,11 @@
|
|||||||
<url-pattern>/config-v1.1.xml</url-pattern>
|
<url-pattern>/config-v1.1.xml</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>AutoconfigServlet</servlet-name>
|
||||||
|
<url-pattern>/autodiscover.xml</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>Queue PacTasks Servlet</servlet-name>
|
<servlet-name>Queue PacTasks Servlet</servlet-name>
|
||||||
|
@ -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)
|
private static Document buildAutodiscoverDocument(final DocumentBuilderFactory builderFactory, String uniqueMailbox)
|
||||||
throws ParserConfigurationException {
|
throws ParserConfigurationException {
|
||||||
DocumentBuilder builder;
|
DocumentBuilder builder;
|
||||||
@ -155,9 +138,6 @@ public class AutoconfigAutodiscoverServlet extends HttpServlet {
|
|||||||
document.appendChild(autodiscover);
|
document.appendChild(autodiscover);
|
||||||
final Element response = document.createElementNS("http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a", "Response");
|
final Element response = document.createElementNS("http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a", "Response");
|
||||||
autodiscover.appendChild(response);
|
autodiscover.appendChild(response);
|
||||||
final Element user = document.createElement("User");
|
|
||||||
response.appendChild(user);
|
|
||||||
appendElementWithText(document, user, "DisplayName", pacDomain);
|
|
||||||
final Element account = document.createElement("Account");
|
final Element account = document.createElement("Account");
|
||||||
response.appendChild(account);
|
response.appendChild(account);
|
||||||
appendElementWithText(document, account, "AccountType", "email");
|
appendElementWithText(document, account, "AccountType", "email");
|
||||||
|
Loading…
Reference in New Issue
Block a user