Accessing HTTPS Webservice using VC++ 7.1
-
Hi Folks, I have a webservice written in Java successfully deployed on Tomcat 5.5.9. I have updated the server configuration file of Tomcat to support SSL communication on port 8443. After restarting the tomcat server, I am able to access the webservice also on the following URL through web-browser. https://localhost:8443/mywebservice As before, it is also accessible on http://localhost:8080/mywebservice. Now, I am developing a COM client in Microsoft Visual Studio (Visual C++ 7.1) that uses this webservice. The stubs are automatically created using the tool SPROXY of Visual Studio. Everything works fine as long as I give the URL of the webservice as http://localhost:8080/mywebservice. But, if I try to give the HTTPS URL "https://localhost:8443/mywebservice", the method invocation on the webservice fails. Infact, the call does not reach at all to the webservice. The call reaches the corresponding method in the stub file (the file generated by sproxy). In the method, it fails while executing "SendRequest" method. While debugging, I found that SendRequest is actually routed to atlsoap.h from where it goes to "Navigate" function in atlhttp.inl. Here, it fails while executing SetDefaultURL function. The exact line where it fails is Line 2142 of atlhttp.inl, which is following:
if ( currScheme != ATL_URL_SCHEME_HTTP && !TSocketClass::SupportsScheme(currScheme) ) return false; // only support HTTP
Could anyone suggest what changes I might have to make to successfully access HTTPS URL from my COM client in the similar way I access HTTP URL ? Thanks & Regards, Arun Gupta -
Hi Folks, I have a webservice written in Java successfully deployed on Tomcat 5.5.9. I have updated the server configuration file of Tomcat to support SSL communication on port 8443. After restarting the tomcat server, I am able to access the webservice also on the following URL through web-browser. https://localhost:8443/mywebservice As before, it is also accessible on http://localhost:8080/mywebservice. Now, I am developing a COM client in Microsoft Visual Studio (Visual C++ 7.1) that uses this webservice. The stubs are automatically created using the tool SPROXY of Visual Studio. Everything works fine as long as I give the URL of the webservice as http://localhost:8080/mywebservice. But, if I try to give the HTTPS URL "https://localhost:8443/mywebservice", the method invocation on the webservice fails. Infact, the call does not reach at all to the webservice. The call reaches the corresponding method in the stub file (the file generated by sproxy). In the method, it fails while executing "SendRequest" method. While debugging, I found that SendRequest is actually routed to atlsoap.h from where it goes to "Navigate" function in atlhttp.inl. Here, it fails while executing SetDefaultURL function. The exact line where it fails is Line 2142 of atlhttp.inl, which is following:
if ( currScheme != ATL_URL_SCHEME_HTTP && !TSocketClass::SupportsScheme(currScheme) ) return false; // only support HTTP
Could anyone suggest what changes I might have to make to successfully access HTTPS URL from my COM client in the similar way I access HTTP URL ? Thanks & Regards, Arun GuptaHave you been able to get this going? I've just looked into the issue and noted I'd have to write my own socket handler. ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.