Wiki source code of ERGroupware

Version 32.1 by Pascal Robert on 2012/09/16 18:53

Show last authors
1 = Actions =
2
3 |= Action name |= CalDAV |= MS Exchange |= Zimbra (SOAP)
4 | Connecting to the store | | ExchangeAuthenticator authenticator = new ExchangeAuthenticator("**DOMAIN
5 \\ 
6 \\probert//aircourriel//**//", "**Migration12**".toCharArray());
7 \\Authenticator.setDefault(authenticator);
8 \\ExchangeWebService service = new ExchangeWebService(new java.net.URL("[[file:/Users/probert/Documents/OACIQ/Services.wsdl.xml>>file:UsersprobertDocumentsOACIQServices.wsdl.xml*]]"), new QName("http:~/~/schemas.microsoft.com/exchange/services/2006/messages", "ExchangeWebService"));
9 \\ExchangeServicePortType port = service.getExchangeWebPort();
10 \\((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME//PROPERTY, "**probert//aircourriel//**//");
11 \\((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD//PROPERTY, "**Migration12**");
12 \\MailboxCultureType culture = new MailboxCultureType();
13 \\culture.setValue("en-US");
14 \\RequestServerVersion serverVersion = new RequestServerVersion();
15 \\serverVersion.setVersion(ExchangeVersionType.EXCHANGE//2010//SP//1);
16 \\TimeZoneDefinitionType tzType = new TimeZoneDefinitionType();
17 \\tzType.setId("**Eastern Standard Time**");
18 \\TimeZoneContextType tzContext = new TimeZoneContextType();
19 \\tzContext.setTimeZoneDefinition(tzType);
20 \\Holder<CreateItemResponseType> responseHolder = new Holder<CreateItemResponseType>(new CreateItemResponseType());
21 \\ExchangeImpersonationType impersonation = new ExchangeImpersonationType();
22 \\ConnectingSIDType sid = new ConnectingSIDType();
23 \\sid.setPrimarySmtpAddress("**probert@aircourriel.com**");
24 \\impersonation.setConnectingSID(sid); //
25 | URL url = new URL("**http**", "**192.168.3.10**", **1**, "/");
26 \\ZMailbox.Options options = new ZMailbox.Options();
27 \\options.setAccount("**admin**");
28 \\options.setAccountBy(AccountBy.name);
29 \\options.setPassword("**conatus**");
30 \\options.setUri(resolveUrl(url.getProtocol() + ":~/~/" + url.getHost(), false));
31 \\ZMailbox utils = ZMailbox.getMailbox(options);
32 \\HttpState initialState = new HttpState();
33 \\Cookie mycookie = new Cookie(url.getHost(), "ZM//AUTH//TOKEN", utils.getAuthToken().getValue(), "/", null, false);
34 \\initialState.addCookie(mycookie);