EWS JAVA API - 1.3 - cannot authenticate NTLM

Just some line to report my experience with the library EWS JAVA API (ews-java-api found at github).
I was trying to send email from my java test application via the EWS service published by an Exchange Server with only NTLM authentication enabled.
The first tries were all unsuccessful, resulting in a authentication problem.
In the end I found the post 14702764 at stackoverflow (how-to-use-ldap-authentication-for-the-exchange-web-services-connection-in-java) that solved my problem.
Once I changed the inner class NTLM inside EwsJCIFSNTLMScheme.java as described in the link above, the problem of authentication via NTLM disappeared.
Following is the error occuring before I changed the libary code:
2014-09-21 01:19:48,818 INFO  [AuthChallengeProcessor] - NTLM authentication scheme selected
2014-09-21 01:19:48,940 INFO  [HttpMethodDirector] - Failure authenticating with NTLM <any realm>@test.domail.com:443
Exception in thread "main" microsoft.exchange.webservices.data.ServiceRequestException: The request failed. null
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:63)
at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:142)
at microsoft.exchange.webservices.data.ExchangeService.internalCreateItems(ExchangeService.java:464)
at microsoft.exchange.webservices.data.ExchangeService.createItem(ExchangeService.java:535)
at microsoft.exchange.webservices.data.Item.internalCreate(Item.java:215)
at microsoft.exchange.webservices.data.EmailMessage.internalSend(EmailMessage.java:125)
at microsoft.exchange.webservices.data.EmailMessage.send(EmailMessage.java:253)
at com.vodafone.spp.test.testews.Main.main(Main.java:40)
Caused by: java.lang.NullPointerException
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.readResponse(SimpleServiceRequestBase.java:141)
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:50)
... 7 more
This is the code fragment to replace in file EwsJCIFSNTLMScheme.java :
    private class NTLM {
    /** Character encoding */
    public static final String DEFAULT_CHARSET = "ASCII";
    * The character was used by 3.x's NTLM to encode the username and
    * password. Apparently, this is not needed in when passing username,
    * password from NTCredentials to the JCIFS library
    private String credentialCharset = DEFAULT_CHARSET;
    void setCredentialCharset(String credentialCharset) {
           this.credentialCharset = credentialCharset;
    private static final int TYPE_1_FLAGS = NtlmFlags.NTLMSSP_NEGOTIATE_NTLM
                 | NtlmFlags.NTLMSSP_NEGOTIATE_UNICODE
                 | NtlmFlags.NTLMSSP_NEGOTIATE_NTLM2;
    private String generateType1Msg(String host, String domain) {
           jcifs.ntlmssp.Type1Message t1m = new jcifs.ntlmssp.Type1Message(
                        TYPE_1_FLAGS, domain, host);
           return jcifs.util.Base64.encode(t1m.toByteArray());
    private String generateType3Msg(String username, String password,
                 String host, String domain, String challenge) {
           jcifs.ntlmssp.Type2Message t2m;
           try {
                 t2m = new jcifs.ntlmssp.Type2Message(
                               jcifs.util.Base64.decode(challenge));
           } catch (IOException e) {
                 throw new RuntimeException("Invalid Type2 message", e);
           final int type2Flags = t2m.getFlags();
           final int type3Flags = type2Flags
                        & (0xffffffff ^ (NtlmFlags.NTLMSSP_TARGET_TYPE_DOMAIN | NtlmFlags.NTLMSSP_TARGET_TYPE_SERVER));
           jcifs.ntlmssp.Type3Message t3m = new jcifs.ntlmssp.Type3Message(
                        t2m, password, domain, username, host, type3Flags);
           return jcifs.util.Base64.encode(t3m.toByteArray());

Hi Andrea
Did you update to  the latest version of java ews api and see the results ?
However after changing the inner class NTLM inside as mentioned 14702764  solved your issue.
We need to check if the latest version of ews api has this value corrected.
Thanks a lot  for posting the solution as well :)
Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com

Similar Messages

  • [E2010][EWS-XML][JAVA]How to get the properties of meeting rooms in Exchange 2010 using EWS Java API

    When you look at meeting room properties in Outlook 2010, you can see 'City', 'Country/Region' and 'Department' information.
    Is there any way to get this information using EWS Java API? 

    Hi Glen,
    I am able to understand what u have said, but do not know how to implement it with meeting rooms....
    If i am implementing
    "Get all appointments between startDate and endDate in the specified folder, including recurring meeting occurrences" in ews-java-api, as you have mentioned above, i am able to get only my appointments from the start date to end date , as i
    have given my email id and password, how to get my organization meeting room details, booked or not.
    static ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
    public static void main(String[] args) throws Exception {
    // TODO Auto-generated method stub
    ExchangeCredentials credentials = new WebCredentials("[email protected]", "zzzz");
    service.setCredentials(credentials);
    try {
    System.out.println("Check");
    service.autodiscoverUrl("[email protected]",new RedirectionUrlCallback());
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    NameResolutionCollection nameResolutions = service.resolveName("SDB1",ResolveNameSearchLocation.DirectoryOnly, true);
    System.out.println("nameResolutions==="+nameResolutions.getCount());
    for(NameResolution nameResolution : nameResolutions)
    System.out.println("NAME==="+nameResolution.getContact().getDisplayName());
    The above code gives me the output like, the meeting room in my organization with word SDB1 are
    Output:
    nameResolutions===2
    NAME===SDB1- TELCON - 1
    NAME===SDB1-TELCON - 2
     for. eg. I need to know today at what are the appointments in the room SDB1-TELCON2 and who all have booked the room.
    I do not know how to implement for the meeting room can you please help me how to give it.
    Thanks in advance.

  • EWS JAVA API 1.2 - Setting Meeting Organizer

    Hi,
    I am evaluating EWS java API ver 1.2 for a use case where we could save an appointment directly to the calendar of an organizer.
    Use Case:
    1. An appointment is created
    2. Appointment is sent from a generic mailbox (Service Account)
    3. Auto update the appointment in the organizer's calndar.
    In my case, the mailbox is not the organizer of the meeting and i should have the capability to set the organizer of a meeting to any person i would want to. Currently, i do not see this capability in the API and the organizer is documented as a read-only
    property.
    Could you please suggest on the following:
    1. How can my use case be implemented with current state of the API
    2. Is there a hook where i can customize the API to implement my use case
    3. Is the use case supported in the .Net version of the API

    >>I am using EWS JAVA API 1.2 to connect to Exchange 2007 SP3
    In your request you have set the server version to Exchange2010 eg
    ><t:RequestServerVersion Version="Exchange2010_SP2" /></soap:Header><soap:Body><m:GetFolder>
    So the server is reporting
    >>The specified server version is invalid.
    Which is correct for Exchange 2007 you need to set the server version to
    ><t:RequestServerVersion Version="Exchange2007_SP1" />
    (there are no EWS schema updates in 2007 SP2 or SP2 so this didn't change)
    Cheers
    Glen

  • EWS JAVA API for availability is giving only 10 suggested times in a particular day

    I'm using EWS JAVA API for seeing the availability of contacts who had shared their calender with me. Here in the suggested timings, I can able to see only 10 suggested timings even though there can be more than 10 suggested slots. 
    I would like to check is there any limit  on suggested times ? 
    API is also giving quality of timing like "Good", "Excellent" on what basis this is decided ?

    You can specify the maximum number of suggestions per day using the MaximumResultsByDay parameter (http://msdn.microsoft.com/en-us/library/office/aa565641(v=exchg.150).aspx).
    The quality is determined based on how many attendees are available and is influenced by the GoodThreshold:
    http://msdn.microsoft.com/en-us/library/office/aa563485(v=exchg.150).aspx.

  • Send a mail on other's behalf using EWS java api

    Hi ,
     I  am using EWS java API for delgate uses.
     I have added a delegate by using following code 
                                DelegateUser newDelegate = new DelegateUser("[email protected]");
       newDelegate.permissions.setInboxFolderPermissionLevel(DelegateFolderPermissionLevel.Editor);
       Mailbox mailbox = new Mailbox("[email protected]");
       ArrayList<DelegateUser> delegates = new ArrayList<DelegateUser>();
       delegates.add(newDelegate);
       service.addDelegates(mailbox, MeetingRequestsDeliveryScope.DelegatesAndMe, delegates);
      it got added sucessfully.
    Now i ([email protected]) am trying to send a mail to somebody won behalf of  "[email protected]".
    How to achive this using java EWS ?
    Below is the message object i have created.
                                    msg = new EmailMessage(service);
    msg.setSubject("Used EWS web services by deepak");
    msg.setBody(MessageBody
    .getMessageBodyFromText("Sent using the EWS Managed API."));
    msg.getToRecipients().add("[email protected]");

    Hi,
    Actually, we have a dedicated support team regarding the Microsoft Exchange Server Development. I recommend you ask your question about EWS java API on our Exchange Server Development forum which is staffed by more experts specializing in this kind of problems.
    For your convenience:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchangesvrdevelopment
    Thanks for your understanding.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Adding and Modifying Calendar w/ EWS JAVA API

    Hello -
      The functionality that I want to achieve is pull appointment information in from a source and then use this information to appointment on to calendar of users. Each user will have different appointments. With the JAVA API how do I go about doing this
    as an Exchange admin user or something similar?
    Thank you,

    Hello -
      The functionality that I want to achieve is pull appointment information in from a source and then use this information to appointment on to calendar of users. Each user will have different appointments. With the JAVA API how do I go about doing this
    as an Exchange admin user or something similar?
    Thank you,

  • Bug in EWS Java API 1.2: Does not support namespace prefix "s" as in "s:Envelope".. Expects "soap:Envelope"

    It can NOT parse ....
    <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="14" MinorVersion="2" MajorBuildNumber="309
    " MinorBuildNumber="3" Version="Exchange2010_SP2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns
    :xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body><m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/service
    s/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetFolderResponseMessage ResponseClass="Success"><m:ResponseCode>NoError</m:Respo
    nseCode><m:Folders><t:CalendarFolder><t:FolderId Id="AAMkADExNjY4ZWRmLWIwN2YtNDAxMS05ZjEzLTg3YTRiMjQ0ZGY3ZQAuAAAAAADU0n/e4OgzQYvxnEFT1sxPAQA1LVqe3bVEQ6g4HVLTxYapAFiIzwa6AAA=" ChangeKey="AgA
    AABYAAACUAPkRiik5TYV1B0n4GmWXAAAAAj0P"/><t:ParentFolderId Id="AAMkADExNjY4ZWRmLWIwN2YtNDAxMS05ZjEzLTg3YTRiMjQ0ZGY3ZQAuAAAAAADU0n/e4OgzQYvxnEFT1sxPAQA1LVqe3bVEQ6g4HVLTxYapAFiI0lHWAAA=" Chang
    eKey="AQAAAA=="/><t:FolderClass>IPF.Appointment</t:FolderClass><t:DisplayName>Calendar</t:DisplayName><t:TotalCount>2</t:TotalCount><t:ChildFolderCount>0</t:ChildFolderCount><t:EffectiveRig
    hts><t:CreateAssociated>true</t:CreateAssociated><t:CreateContents>true</t:CreateContents><t:CreateHierarchy>true</t:CreateHierarchy><t:Delete>true</t:Delete><t:Modify>true</t:Modify><t:Rea
    d>true</t:Read><t:ViewPrivateItems>true</t:ViewPrivateItems></t:EffectiveRights><t:PermissionSet><t:CalendarPermissions><t:CalendarPermission><t:UserId><t:DistinguishedUser>Default</t:Disti
    nguishedUser></t:UserId><t:CanCreateItems>false</t:CanCreateItems><t:CanCreateSubFolders>false</t:CanCreateSubFolders><t:IsFolderOwner>false</t:IsFolderOwner><t:IsFolderVisible>false</t:IsF
    olderVisible><t:IsFolderContact>false</t:IsFolderContact><t:EditItems>None</t:EditItems><t:DeleteItems>None</t:DeleteItems><t:ReadItems>TimeOnly</t:ReadItems><t:CalendarPermissionLevel>Free
    BusyTimeOnly</t:CalendarPermissionLevel></t:CalendarPermission><t:CalendarPermission><t:UserId><t:DistinguishedUser>Anonymous</t:DistinguishedUser></t:UserId><t:CanCreateItems>false</t:CanC
    reateItems><t:CanCreateSubFolders>false</t:CanCreateSubFolders><t:IsFolderOwner>false</t:IsFolderOwner><t:IsFolderVisible>false</t:IsFolderVisible><t:IsFolderContact>false</t:IsFolderContac
    t><t:EditItems>None</t:EditItems><t:DeleteItems>None</t:DeleteItems><t:ReadItems>None</t:ReadItems><t:CalendarPermissionLevel>None</t:CalendarPermissionLevel></t:CalendarPermission></t:Cale
    ndarPermissions></t:PermissionSet></t:CalendarFolder></m:Folders></m:GetFolderResponseMessage></m:ResponseMessages></m:GetFolderResponse></s:Body></s:Envelope>
    microsoft.exchange.webservices.data.ServiceRequestException: The request failed. An element node 'soap:Envelope' of the type START_ELEMENT was expected, but node '{http://schemas.xmlsoap.or
    g/soap/envelope/}Envelope' of type START_ELEMENT was found.
            at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:51)
            at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:142)
            at microsoft.exchange.webservices.data.ExchangeService.bindToFolder(ExchangeService.java:346)
            at microsoft.exchange.webservices.data.ExchangeService.bindToFolder(ExchangeService.java:370)
            at microsoft.exchange.webservices.data.Folder.bind(Folder.java:50)
            at microsoft.exchange.webservices.data.Folder.bind(Folder.java:69)
            at com.tsg.ews.GetItemWorker.run(GetItemWorker.java:252)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: microsoft.exchange.webservices.data.ServiceXmlDeserializationException: An element node 'soap:Envelope' of the type START_ELEMENT was expected, but node '{http://schemas.xmlsoap.
    org/soap/envelope/}Envelope' of type START_ELEMENT was found.
            at microsoft.exchange.webservices.data.EwsXmlReader.internalReadElement(EwsXmlReader.java:114)
            at microsoft.exchange.webservices.data.EwsXmlReader.readStartElement(EwsXmlReader.java:618)
            at microsoft.exchange.webservices.data.ServiceRequestBase.readResponse(ServiceRequestBase.java:450)
            at microsoft.exchange.webservices.data.SimpleServiceRequestBase.readResponse(SimpleServiceRequestBase.java:101)
            at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:38)

    After these change still I am getting this kind of Error:
    microsoft.exchange.webservices.data.ServiceRequestException
        at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:63)
        at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:142)
        at microsoft.exchange.webservices.data.ExchangeService.internalFindFolders(ExchangeService.java:202)
        at microsoft.exchange.webservices.data.ExchangeService.findFolders(ExchangeService.java:257)
        at ci.cryoserver.ews.EWSUtils.testEWSWebService(Unknown Source)
        at org.apache.jsp.save_005fimap_005fmailbox_005freader_005fuserinfo_jsp._jspService(save_005fimap_005fmailbox_005freader_005fuserinfo_jsp.java:453)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at ci.cryoserver.frontend.filter.CompanyTagFilter.doFilter(CompanyTagFilter.java:69)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at ci.cryoserver.ntlm.CryoHttpSecurityFilter.doFilter(CryoHttpSecurityFilter.java:105)
        at ci.cryoserver.ntlm.SSOFilter.doFilter(SSOFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at ci.cryoserver.ntlm.NTLMPostFilter.doFilter(NTLMPostFilter.java:39)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at ci.cryoserver.frontend.filter.CharsetFilter.doFilter(CharsetFilter.java:152)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
    Caused by: microsoft.exchange.webservices.data.ServiceXmlDeserializationException: An element node 'soap:Header' of the type START_ELEMENT was expected, but node '{http://schemas.xmlsoap.org/soap/envelope/}Body' of type START_ELEMENT was found.
        at microsoft.exchange.webservices.data.EwsXmlReader.internalReadElement(EwsXmlReader.java:121)
        at microsoft.exchange.webservices.data.EwsXmlReader.readStartElement(EwsXmlReader.java:625)
        at microsoft.exchange.webservices.data.ServiceRequestBase.readSoapHeader(ServiceRequestBase.java:565)
        at microsoft.exchange.webservices.data.ServiceRequestBase.readResponse(ServiceRequestBase.java:525)
        at microsoft.exchange.webservices.data.SimpleServiceRequestBase.readResponse(SimpleServiceRequestBase.java:171)
        at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:49)
        ... 40 more
    This Account is working perfectly with autodiscovery mode. any fix for this ?

  • Facing issue in suggested meeting time in ews-java-api

    Hi,
    I have a meeting room id , and i want to get Free and Busy schedule of the meeting room , below is the code i am using
    List<AttendeeInfo> attendees = new ArrayList<AttendeeInfo>();
    attendees.add(new AttendeeInfo([email protected]));
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Date startDate = formatter.parse("2015-03-03 00:00:00");
    Date endDate = formatter.parse("2015-03-05 00:00:00");
    // Call the availability service.
    GetUserAvailabilityResults results = exchangService.getUserAvailability(
    attendees,
    new TimeWindow(startDate, endDate),
    AvailabilityData.FreeBusyAndSuggestions);
    // Output attendee availability information.
    int attendeeIndex = 0;
    for (AttendeeAvailability attendeeAvailability : results.getAttendeesAvailability()) {
    System.out.println("Availability for " + attendees.get(attendeeIndex).getSmtpAddress());
    //if (attendeeAvailability.getErrorCode() == ServiceError.NoError) {
    for (CalendarEvent calendarEvent : attendeeAvailability.getCalendarEvents()) {
    System.out.println("Calendar event : "+ calendarEvent.getFreeBusyStatus().toString());
    System.out.println(" Start time: " + calendarEvent.getStartTime().toString());
    System.out.println(" End time: " + calendarEvent.getEndTime().toString());
    if (calendarEvent.getDetails() != null)
    System.out.println(" Subject: " + calendarEvent.getDetails().getSubject());
    // Output additional properties.
    attendeeIndex++;
    for (Suggestion suggestion : results.getSuggestions()) {
    System.out.println("Suggested day: " + suggestion.getDate().toString());
    //System.out.println("Overall quality of the suggested day: " + suggestion.getQuality().toString());
    for (TimeSuggestion timeSuggestion : suggestion.getTimeSuggestions()) {
    System.out.println("Suggested time: " + timeSuggestion.getMeetingTime().toString());
    // Output additonal properties.
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    I am getting output like,
    Calendar event : Busy
    Start time: Tue Mar 03 10:00:00 GMT+05:30 2015
    End time: Tue Mar 03 17:00:00 GMT+05:30 2015
    Calendar event : Busy
    Start time: Wed Mar 04 12:00:00 GMT+05:30 2015
    End time: Wed Mar 04 13:00:00 GMT+05:30 2015
    Calendar event : Busy
    Start time: Wed Mar 04 13:00:00 GMT+05:30 2015
    End time: Wed Mar 04 18:30:00 GMT+05:30 2015
    Suggested day: Tue Mar 03 00:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 17:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 17:30:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 18:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 18:30:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 19:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 19:30:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 20:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 20:30:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 21:00:00 GMT+05:30 2015
    Suggested time: Tue Mar 03 21:30:00 GMT+05:30 2015
    Suggested day: Wed Mar 04 00:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 05:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 06:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 06:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 07:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 07:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 08:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 08:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 09:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 09:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 10:00:00 GMT+05:30 2015
    In the above output, for the corresponding date Mar 03, it is showing busy time correctly, but in the suggested time which is free , it is showing until 21.30 only, it need to showed until 23.30 as that also a suggested time which is free, Similarly, in
    next day ie. Mar 04, it shows busy time correctly, but suggested time which is free is shown until 10:00 am only, why it is not showing after 10 am. Please help me to solve this issue and how to proceed further to show the remaining free meeting time also.
    Thanks,
    Akshea.

    Hi Jason,
    Thanks for your response, your answer works ,i gave max. number of suggestions per day as 48, but i have a doubt,
    Suggested day: Wed Mar 04 00:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 11:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 18:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 19:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 19:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 20:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 20:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 21:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 21:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 22:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 22:30:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 23:00:00 GMT+05:30 2015
    Suggested time: Wed Mar 04 23:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 00:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 00:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 01:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 01:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 02:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 02:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 03:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 03:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 04:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 04:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 05:00:00 GMT+05:30 2015
    Suggested day: Thu Mar 05 00:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 05:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 06:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 06:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 07:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 07:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 08:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 10:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 10:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 11:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 11:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 12:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 12:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 13:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 13:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 14:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 14:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 15:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 15:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 16:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 16:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 17:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 17:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 18:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 18:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 19:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 19:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 20:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 20:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 21:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 21:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 22:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 22:30:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 23:00:00 GMT+05:30 2015
    Suggested time: Thu Mar 05 23:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 00:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 00:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 01:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 01:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 02:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 02:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 03:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 03:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 04:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 04:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 05:00:00 GMT+05:30 2015
    Suggested day: Fri Mar 06 00:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 05:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 06:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 06:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 07:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 09:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 09:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 10:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 10:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 11:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 11:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 12:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 12:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 13:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 13:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 14:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 14:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 15:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 15:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 16:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 16:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 17:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 17:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 18:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 18:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 19:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 19:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 20:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 20:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 21:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 21:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 22:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 22:30:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 23:00:00 GMT+05:30 2015
    Suggested time: Fri Mar 06 23:30:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 00:00:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 00:30:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 01:00:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 01:30:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 02:00:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 02:30:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 03:00:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 03:30:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 04:00:00 GMT+05:30 2015
    Suggested time: Sat Mar 07 04:30:00 GMT+05:30 2015
    This is my output,
    i gave start date from 04-Mar-2015 and end date 07-Mar-2015, so it shows me the meeting suggestion time from 04-Mar to 06-Mar till 23.30, that is fine, but for 07-Mar, it just shows first 10 meeting time only till 4.30 only, y so, on 07-Mar-2015 also it
    should give time till 23.30 . right.

  • Iterate through all the records in a table using Java API

    Hi All,
    What is the easiest way to iterate through all the records in a given table using Java API? I cannot find any methods that will return all records in a table and the only way I can use is to perform a free form search with a condition that is always true. The code works but is pretty ugly. Is there an alternative to this approach?
    Thanks!
    Kenny

    Hi Kenny,
    You can construct a new Search object with your table's code name, a new ResultSetDefinition object for your table and just execute this search using the GetResultSet method of CatalogData.
    Please look at the following code:
    Search search = new Search(<code name of your table>);
    ResultSetDefinition rsd = new ResultSetDefinition(<code name of your table>);
    rsd.AddField<code name of a field>);
    rsd.AddField(<code name of a field>);
    String sortField = <code name of your sort field>;
    boolean sortAscending = true;
    int page = 0; //page number
    A2iResultSet rs = <your CatalogData object>.GetResultSet(search, rsd, sortField, sortAscending, page);
    for (int i = 0; i < rs.GetRecordCount(); i++)
        Value fieldValue = rs.GetValueAt(i, <code name of a field>);
    Hope this helps,
    Nir
    PS - I really recommend you to start using the new API, as it is much more efficient and straight-forward.

  • Issue with new EWS Java 1.2 license and ambiguity

    If this isn't the proper place for this thread, then please let me know where it should go.
    I noticed that EWS Java 1.2 has been marked with an Apache 2.0 license. Let me just say this...
    FINALLY!
    If ever there was a project that needed it, it's EWS Java. That API has seemingly turned into abandonware and the old license forbade redistribution of modified source, so the many bugs in it had to be independently fixed by devs around the world. Not fun.
    With a proper open source license, this problem can be alleviated.
    HOWEVER...
    After downloading the zip file from the new EWS Java page, I've found that while the Apache 2.0 license is present in the root directory, the earlier and more restrictive license is still present in the project directory. This introduces ambiguity into the
    license terms. Not good. I would not be comfortable redistributing modified (or even original) source code with this kind of ambiguity, even if it's just an oversight on Microsoft's part. Please remove the old license entirely from the API.
    Also, if possible, can this get an official repository? The new license is great, but with only a zip file as an "official" source, it's begging for fragmentation across who-knows-how-many repositories and accounts, especially since it's not even
    a proper Maven project.
    I'd love to do some work on EWS Java myself (I've already fixed a number of bugs), but with the license issues and lack of an official repository, that doesn't seem terribly feasible.

    I'm not sure if you're going to be able to reliably find an actual fulltime MSFT person (especially targeted towards a specific product group) in any of these forums. You might try posting a comment on this blog post though, that might help get someone's
    attention:
    http://blogs.msdn.com/b/exchangedev/archive/2013/01/03/ews-java-api-1-2-get-started.aspx?Redirected=true#comments
    We do have a Microsoft employee who moderates this forum, but since this forum is only meant for feedback on the defunct TechNet subscriptions I don't think he'll be able to help you out very much. We'll see though, maybe Mike has some Exchange team connections
    that I don't know about.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Issue with EWS Java 1.2 license ambiguity

    If this isn't the proper place for this thread, then please let me know where it should go.
    I noticed that EWS Java 1.2 has been marked with an Apache 2.0 license. Let me just say this...
    FINALLY!
    If ever there was a project that needed it, it's EWS Java. That API has seemingly turned into abandonware and the old license forbade redistribution of modified source, so the many bugs in it had to be independently fixed by devs around the world. Not fun.
    With a proper open source license, this problem can be alleviated.
    HOWEVER...
    After downloading the zip file from the new EWS Java page, I've found that while the Apache 2.0 license is present in the root directory, the earlier and more restrictive license is still present in the project directory. This introduces ambiguity into the
    license terms. Not good. I would not be comfortable redistributing modified (or even original) source code with this kind of ambiguity, even if it's just an oversight on Microsoft's part. Please remove the old license entirely from the API.
    Also, if possible, can this get an official repository? The new license is great, but with only a zip file as an "official" source, it's begging for fragmentation across who-knows-how-many repositories and accounts, especially since it's not even
    a proper Maven project.
    I'd love to do some work on EWS Java myself (I've already fixed a number of bugs), but with the license issues and lack of an official repository, that doesn't seem terribly feasible.

    I'm not sure if you're going to be able to reliably find an actual fulltime MSFT person (especially targeted towards a specific product group) in any of these forums. You might try posting a comment on this blog post though, that might help get someone's
    attention:
    http://blogs.msdn.com/b/exchangedev/archive/2013/01/03/ews-java-api-1-2-get-started.aspx?Redirected=true#comments
    We do have a Microsoft employee who moderates this forum, but since this forum is only meant for feedback on the defunct TechNet subscriptions I don't think he'll be able to help you out very much. We'll see though, maybe Mike has some Exchange team connections
    that I don't know about.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Java API Failed to authenticate the user session with LDAP

    I have created a Java class that uses the MDM Java Api's it works fine on our Development environment where the MDM server uses its own built in authentication, but when I moved it to our QA environment where MDM use LDAP for authentication its failed with a  'Failed to authenticate the user session'.  Has anyone seen this before?

    hi Dan,
    The java class which u have created that suppose to works fine on MDM server because to execute that program there are no requirement of such protocols, the problem u will face while exporting those program to an client machine
    LDAP(Lightweight Directory Access protocol) connector communicates with the SAP system using RFC and with the directory server using these standard communication protocol.
    so try to select the protocol such that it should help in making connection between the server,direcotryserver and the client machine through which u can execute u r java class using java Api's.
    i hope this will give u an idea to through ur problem.
    regards,
    swapnil

  • Outllook API to know who have booked the room at the particular time - ews-java

    Hi,
    As, of now i am able to get whether the particular meeting room is free/busy at the particular time, now I want to know is there any Outlook
    APIs for getting the details like If
    booked, who has booked that room. Employee Name, and other details if any.
    I need to know what are the APIs need to be used, I need to develop in JAVA, so java api is required. Any sample is there, please provide me to work on. Please help me. Thanks in advance

    anyone?

  • SEEBURGER AS2: AS2 Adapter failure - Cannot authenticate the user

    Hello,
    All was working fine but now I got these errors in an AS2 scenario. Sending a message via AS2. Also we don't receive any messages via AS2 anymore. This is the error when sending a message:
    Unable to forward message to JCA adapter. Reason: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user., SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user.
    MP: Exception caught with cause javax.resource.ResourceException: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user., SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user.
    Exception caught by adapter framework: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user., SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user
    Delivery of the message to the application using connection AS2_http://seeburger.com/xi failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user., SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Cannot authenticate the user.: javax.resource.ResourceException: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure.
    Please advice, many thanks!
    Erik

    Are you using the "Use Authentication" option in the communication channel? If yes, then ensure that the user provided is correct and is not locked. Also recheck the authentication certificate settings.
    Regards,
    Prateek

  • Unable to raise password expiry warning exception in OID using JAVA API

    Hi,
    We are maintaing the user information for our application in OID(9.2). During logon, it is required that a warning is given to the user according to the value set in "Password Expiration Warning" parameter.
    A pl/sql program (using DBMS_LDAP/DBMS_LDAP_UTL packages) written to test password expiry raises the PWD_EXPIRE_WARN exception as expected. However we are unable to simulate the same using the JAVA APIs.
    We did try some thing like the following:
    public class SampleExpire {
    public static void main(String argv[])
    throws NamingException {
    // Create InitialDirContext
    InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx( "TCS-UUODC4",
    "4032",
    "cn=orcladmin",
    "welc0me" );
    System.out.println("Hello");
    // Create User Objects
    User myuser = null,
    try {
    // Create User using a subscriber DN and the User DN
    myuser = new User ( ctx,
    Util.IDTYPE_DN,
    "uid=C100013, ou=People, o=UUSD",
    Util.IDTYPE_DN,
    "ou=People, o=UUSD",
    false );
    catch ( UtilException e ) {
    * Exception encountered in User object constructor
    System.out.println("User creation failed");
    // Authenticate User
    try {
    myuser.authenticateUser(ctx,User.CREDTYPE_PASSWD,"Z100013");
    catch ( UtilException e ) {
    * Authenticate fails
    System.out.println("Authentication failed");
    } // End of SampleExpire.java
    The authenticate user does not raise any exception.
    Am I missing something ?
    Regards -
    Adhiraj

    Hi,
    did you manage to solve this problem? Please let me know

Maybe you are looking for