2
* File: gsoapWinInet2.h
4
* Authors: 26 May 2003: Jack Kustanowitz (jackk@atomica.com)
7
* 29 September 2003: Brodie Thiesfield (bt@jellycan.com)
8
* Rewritten as C plugin for gsoap. Bugs fixed and features added.
10
* 14 January 2004: Brodie Thiesfield (bt@jellycan.com)
13
* Purpose: Allow gsoap clients (not servers) to direct all communications
14
* through the WinInet API. This automatically provides all of the
15
* proxy and authentication features supported by the control panel
16
* 'Internet Options' dialog to the client. As these options are
17
* shared by IE, this means that "if IE works, gsoap works."
20
* + gsoap plugin - extremely easy to use
21
* + complete support for:
22
* - HTTP/1.0 and HTTP/1.1
23
* - HTTPS (no extra libraries are required)
24
* - HTTP authentication
25
* - Proxy servers (simple, automatic discovery, etc)
26
* - Proxy authentication (basic, NTLM, etc)
27
* + authentication prompts and HTTPS warnings (e.g. invalid HTTPS CA)
28
* can be resolved by the user via standard system dialog boxes.
29
* + message size is limited only by available memory
30
* + connect, receive and send timeouts are used
31
* + supports all SOAP_IO types (see limitations)
32
* + written completely in C, can be used in C, C++, and MFC projects
33
* without modification (anywhere that gsoap is used)
34
* + can be used in both MBCS and UNICODE projects
35
* + compiles cleanly at warning level 4 (if gsoap uses SOAP_SOCKET
36
* for the definition of sockets instead of int, it will also
37
* compile without win64 warnings).
38
* + all debug trace goes to the gsoap TEST.log file
39
* + supports multiple threads (all plugin data is stored in the
40
* soap structure - no static variables)
43
* - DIME attachments are not supported
44
* - may internally buffer the entire outgoing message before sending
45
* (if the serialized message is larger then SOAP_BUFLEN, or if
46
* SOAP_IO_CHUNK mode is being used then the entire message will
49
* Usage: Add the gsoapWinInet2.h and gsoapWinInet2.cpp files to your project
50
* (if you have a C project, rename gsoapWinInet2.cpp to .c and use
51
* it as is). Ensure that you turn off precompiled headers for the
54
* In your source, just after calling soap_init(), register this
55
* plugin with soap_register_plugin( soap, wininet_plugin ).
60
* soap_register_plugin( &soap, wininet_plugin );
61
* soap.connect_timeout = 5; // this will be used by wininet too
65
* Notes: For extra control, you may also register this plugin using the
66
* soap_register_plugin_arg() function, and supply as the argument
67
* flags which you wished to be passed to HttpOpenRequest.
72
* soap_register_plugin_arg( &soap, wininet_plugin,
73
* (void*) INTERNET_FLAG_IGNORE_CERT_CN_INVALID );
75
* See the MSDN documentation on HttpOpenRequest for details of
76
* available flags. The <wininet.h> header file is required for the
77
* definitions of the flags. Some flags which may be useful are:
79
* INTERNET_FLAG_KEEP_CONNECTION
80
* Uses keep-alive semantics, if available, for the connection.
81
* This flag is required for Microsoft Network (MSN), NT LAN
82
* Manager (NTLM), and other types of authentication.
83
* ++ Note that this flag is used automatically when soap.omode
84
* has the SOAP_IO_KEEPALIVE flag set. ++
86
* INTERNET_FLAG_IGNORE_CERT_CN_INVALID
87
* Disables Microsoft Win32 Internet function checking of SSL/PCT-
88
* based certificates that are returned from the server against
89
* the host name given in the request.
91
* INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
92
* Disables Win32 Internet function checking of SSL/PCT-based
93
* certificates for proper validity dates.
95
* This plugin uses the following callback functions and is not
96
* compatible with any other plugin that uses these functions.
104
* If there are errors in sending the HTTP request which would
105
* cause a dialog box to be displayed in IE (for instance, invalid
106
* certificates on an HTTPS connection), then a dialog will also
107
* be displayed by this library. At the moment is is not possible
108
* to disable the UI. If you wish to remove the UI then you will
109
* need to hack the source to remove the dialog box and resolve the
110
* errors programmatically, or supply the appropriate flags in
111
* soap_register_plugin_arg() to disable the unwanted warnings.
113
* Because messages are buffered internally to gsoapWinInet2 plugin
114
* it is recommended that the SOAP_IO_STORE flag is not used otherwise
115
* the message may be buffered twice on every send. Use the default
116
* flag SOAP_IO_BUFFER, or SOAP_IO_FLUSH.
119
* Feel free to use, improve, and share. I would appreciate
120
* notification of any bugs found/fixed, or improvements made. This
121
* code has not been extensively tested, so use at your own risk.
123
#ifndef INCLUDED_gsoapWinInet2_h
124
#define INCLUDED_gsoapWinInet2_h
126
#include <stdsoap2.h>
134
struct soap * a_pSoap,
135
struct soap_plugin * a_pPluginData,
142
#endif // INCLUDED_gsoapWinInet2_h