none
EWS Java API - Internal server error 500 RRS feed

  • Question

  • Hi,

    I'm trying to connect to my exchange server (v 2007) using the Java API and getting a 500 server error exception when I run the trace.

    Caused by: java.lang.Exception: The remote server returned an error: (500)Internal Server Error
        at microsoft.exchange.webservices.data.ServiceRequestBase.emit(Unknown Source)
        ... 10 more

    The server Url I'm connecting to is using https. In my Java class i use WebCredentials when setting my credentials. I'm also using the trust manager settings as mentioned in the Getting started file packaged with the EWS Jar.

    Is it possible to find the route cause when i dont have access to the Exchange server? I have see recommendations to change the Authentication type on the IIS server managing Exchange from NTLM to Basic, however as stated earlier i dont have access to that server.

    Any suggestions welcome. Thanks

    ExchangeService exService = new ExchangeService();
    exService.setCredentials(new WebCredentials("username", "password", "domain"));
    exService.setUrl( new URI("https://myserver/Exchange.asmx") );
    exService.setTraceEnabled(true);


    Monday, July 18, 2011 9:03 AM

All replies

  • Hi,

    the correct service url would be https://exchangeserver/ews/exchange.asmx.

    Kind regards,
    Henning Krause

    "linuxlewis" wrote in message news:c85e47fd-d422-4c92-9910-e2ee55a976b8@communitybridge.codeplex.com...

    Hi,

    I'm trying to connect to my exchange server (v 2007) using the Java API and getting a 500 server error exception when I run the trace.

    Caused by: java.lang.Exception: The remote server returned an error: (500)Internal Server Error
       at microsoft.exchange.webservices.data.ServiceRequestBase.emit(Unknown Source)
       ... 10 more

    The server Url I'm connecting to is using https. In my Java class i use WebCredentials when setting my credentials. I'm also using the trust manager settings as mentioned in the Getting started file packaged with the EWS Jar.

    Is it possible to find the route cause when i dont have access to the Exchange server? I have see recommendations to change the Authentication type on the IIS server managing Exchange from NTLM to Basic, however as stated earlier i dont have access to that server.

    Any suggestions welcome. Thanks

    ExchangeService exService = new ExchangeService();
    exService.setCredentials(new WebCredentials("username", "password", "domain"));
    exService.setUrl( new URI("https://myserver/Exchange.asmx") );
    exService.setTraceEnabled(true);

    Monday, July 18, 2011 9:06 AM
  • yes i have the correct Url, i changed it when masking my passwords etc The domain is different but everything after the first / is the same
    Monday, July 18, 2011 9:15 AM
  • The problem appears to be an incompatibility between the NTLM authentication on my client machine with that of what is on the IIS server, I think it uses NTLMv2. I tried to get around this by updating the Local security settings to use 'Send NTLMv2 response only\refuse LM & NTLM' however this still returns the 'The function requested is not supported' error.
    Monday, July 18, 2011 10:55 AM