cmbntr / clj-exchange

Accessing Exchange Web Services from Clojure
http://cmbntr.github.com/clj-exchange
5 stars 0 forks source link

EWS service endpoint autodiscovery #1

Open 29decibel opened 10 years ago

29decibel commented 10 years ago

Hi @cmbntr I really like this project, what I want is to retrieve the calendar items from my company's exchange server.

I tried the example code in the Readme, but always get 401. I've tried the same endpoint+username+password using Viewpoint - a ruby exchange lib, and it's successfully connected.

ClientTransportException The server sent HTTP status code 401: Unauthorized  com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode (HttpTransportPipe.java:296)

I noticed one thing that I've use is I am using discover service, so the endpoint is something like this: https://autodiscover.mycompany-name.com/ews/Exchange.asmx, not sure if that matters?

Thanks!

cmbntr commented 10 years ago

Hi @29decibel

The EWS service endpoint is normally located somewhere else...

https://autodiscover.mycompany-name.com/autodiscover/autodiscover.xml is a resource which will contain the relevant EWS service URLs when retrieved with an appropriate POST request.

The autodiscover mechanism has not (yet) been implemented in clj-exchange.

As a workaround you have at least a few options:

I will rename the issue, to have a handle to track autodiscover implementation in clj-exchange.

29decibel commented 10 years ago

Thanks @cmbntr , that's super helpful! I will give it try.