ERGroupware
Version 33.1 by Pascal Robert on 2012/09/16 18:53
Actions
Action name | CalDAV | MS Exchange | Zimbra (SOAP) |
---|---|---|---|
Connecting to the store | ExchangeAuthenticator authenticator = new ExchangeAuthenticator("DOMAIN probertaircourriel", "Migration12".toCharArray()); Authenticator.setDefault(authenticator); ExchangeWebService service = new ExchangeWebService(new java.net.URL("file:/Users/probert/Documents/OACIQ/Services.wsdl.xml"), new QName("http://schemas.microsoft.com/exchange/services/2006/messages", "ExchangeWebService")); ExchangeServicePortType port = service.getExchangeWebPort(); ((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAMEPROPERTY, "probertaircourriel"); ((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORDPROPERTY, "Migration12"); MailboxCultureType culture = new MailboxCultureType(); culture.setValue("en-US"); RequestServerVersion serverVersion = new RequestServerVersion(); serverVersion.setVersion(ExchangeVersionType.EXCHANGE2010SP1); TimeZoneDefinitionType tzType = new TimeZoneDefinitionType(); tzType.setId("Eastern Standard Time"); TimeZoneContextType tzContext = new TimeZoneContextType(); tzContext.setTimeZoneDefinition(tzType); Holder<CreateItemResponseType> responseHolder = new Holder<CreateItemResponseType>(new CreateItemResponseType()); ExchangeImpersonationType impersonation = new ExchangeImpersonationType(); ConnectingSIDType sid = new ConnectingSIDType(); sid.setPrimarySmtpAddress("probert@aircourriel.com"); impersonation.setConnectingSID(sid); | ||
URL url = new URL("http", "192.168.3.10", 1, "/"); ZMailbox.Options options = new ZMailbox.Options(); options.setAccount("admin"); options.setAccountBy(AccountBy.name); options.setPassword("conatus"); options.setUri(resolveUrl(url.getProtocol() + "://" + url.getHost(), false)); ZMailbox utils = ZMailbox.getMailbox(options); HttpState initialState = new HttpState(); Cookie mycookie = new Cookie(url.getHost(), "ZMAUTHTOKEN", utils.getAuthToken().getValue(), "/", null, false); initialState.addCookie(mycookie); |