2017年2月23日 星期四

Rebuild wsdl2h with SSL/TLS enabled.

If you want to translates HTTPS's WSDL and XSD files to a gSOAP header file by wsdl2h.exe. You will get below error because wsdl2h.exe is not support SSL/TLS.

Cannot connect to https site: SSL/TLS support not enabled, please rebuild wsdl2h with SSL/TLS enabled using 'make secure' or download the WSDL/WADL and XSD files and rerun wsdl2h on these files directly by specifying the file names on the c ommand line.



To enable SSL/TLS, you can rebuilt wsdl2h.exe using Visual Studio.
1. Install openssl
2. Open wsdl2h.sln (gsoap-2.8\gsoap\VisualStudio2005\wsdl2h)

3. Property Page>Configuration Properties>C/C++>Command Line>Additional Options
    add /DWITH_OPENSSL 
4. Property Page>Configuration Progerties>C/C++>General>Additional Include Directories
    add ssl's include folder
    add plugin floder (gsoap-2.8\gsoap\plugin)
5. Property Page>Configuration Progerties>C/C++>Precompiled Headers>Precompiled Header
    Choose "Not Using Precompiled Headers"
6. Property Page>Configuration Progerties>Linker>General>Additional Library Directories
    add ssl's lib folder
7. Property Page>Configuration Progerties>Linker>Input>Additional Dependencies
    add libeay32.lib and ssleay32.lib

8. Source Files
    add Existing Item httpda.c, smdevp.c and threads.c (copy them from gsoap-2.8\gsoap\plugin)
9. BUILD>Rebuild Solution
10. Copy libeay32.dll and ssleay32.dll (from ssl's bin folder) to wsdl2h\release folder.

Now you can translate HTTPS's WSDL and XSD files to a gSOAP header file by wsdl2h.exe






沒有留言:

張貼留言