开发者

Java client, SOAP and Exchange Web Services (EWS)

开发者 https://www.devze.com 2023-02-09 18:46 出处:网络
I\'m working on creating a simple method that send SOAP request to EWS and it seems everything is OK. But when I run it I get error:

I'm working on creating a simple method that send SOAP request to EWS and it seems everything is OK. But when I run it I get error:

java.net.ProtocolException: Server redirected too many times (20)

Any ideas why I get this when I try to connect to https://my.exchange.server/ews/Services.开发者_Go百科wsdl ?

Note: my.exchange.server is just a cover for my real URL


Make sure to enable Basic Authentication on EWS, sorry that's on the server side :). I am using EWS Java Api http://archive.msdn.microsoft.com/ewsjavaapi and it works fine even cross domains:

ExchangeService service = new ExchangeService();
ExchangeCredentials credentials = new WebCredentials("Administrator@yourdomain.com", "Password",
           "yourdomain.com");
service.setCredentials(credentials);
service.setUrl(new URI("http://yourserver/EWS/Exchange.asmx"));
service.setPreAuthenticate(true);

BTW, I am also successfully reaching it with plain SOAP using SoapUI, but the key factor is enabled Basic Authentication, and URL is "http://yourserver/EWS/Exchange.asmx" Good luck,
Boris
Herndon, VA

0

精彩评论

暂无评论...
验证码 换一张
取 消