Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Accessing HTTPS Webservice using VC++ 7.1

Accessing HTTPS Webservice using VC++ 7.1

Scheduled Pinned Locked Moved ATL / WTL / STL
c++csharpjavavisual-studiocom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arun1405
    wrote on last edited by
    #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

    E 1 Reply Last reply
    0
    • A arun1405

      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

      E Offline
      E Offline
      Ed K
      wrote on last edited by
      #2

      Have 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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups