Copy link to clipboard
Copied
I have CF 8,0,1,195765 Standard on Windows Server 2003 and Exchange Server 2007. I exported a certificate from Exchange and installed it in CF's default keystore (since my Exchange requires SSL) and restarted CF. Variable `xmlOut` is an XML document requesting an operation ('CreateItem').
Below is the code that fails with "Error: 401 Unauthorized. / Unable to read WSDL from URL: https://myServer/EWS/Exchange.asmx.":
<cfscript>
objWS = CreateObject("webservice", "https://myServer/EWS/Exchange.asmx");
response = objWS.CreateItem(xmlOut);
</cfscript>
I realize an HTTP 401 error is security/permission-related but to the best of my knowledge the cert is installed in CF correctly. I cannot append our internal domain to the server name because CF throws "Error: javax.net.ssl.SSLException: Name in certificate `myServer' does not match host name `myServer.my.domain'.", so it appears CF and IIS are communicating at the SSL level.
I can browse the Exchange.asxm file but the browser is immediately redirected to Services.wsdl. Browsing the .asmx URL in FireFox 3 causes a prompt for domain username and password while IE 7 does not. Is CF encountering the same underlying prompt, even though a certificate is used?
Anyone have experience doing this? Thanks.
Copy link to clipboard
Copied
Is CF encountering the same underlying prompt, even though a
certificate is used?
Indeed, that is what's happening. From previous questions and answers
on these forums I seem to remember that ColdFusion can't do
transparent NTLM authentication (IE 7 is sending your authentication
data to the server "behind your back" so the server knows who you
are).
Search the forums because I remember this problem has been discussed before.
Mack
Copy link to clipboard
Copied
Thanks, Mack. Since that post I'm now able to connect to the .asmx page w/o a certificate issue. I do have to specify a valid domain username and password in a structure which is an argument to CreateObject(). I had to adjust security settings of the IIS virtual directory to allow Basic Authentication and specify our Windows domain and realm.
But now there's a new issue: I'm receiving error messages "Name: https://myServer.my.domain/EWS/Exchange.asmx. WSDL: https://myServer.my.domain/EWS/Exchange.asmx. It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness, including a missing service element." and "Cannot locate an API in the generated service class that returned the right interface for web service invocation." I've poured over the WSDL file and tried specifying various methods I see but I always receive the same errors. Perhaps it's my inexperience w/ reading WSDLs...or this isn't possible.
I've scoured these forums and the web for any references to invoking Exchange's web services via CF but have found none. Surely I can't be the only one who's tried.