![]() |
Home | Documentation |
mod_gsoap.c File Reference
updated Sat Mar 27 2021 by Robert van Engelen
|
#include <stdio.h>
#include <assert.h>
#include <dlfcn.h>
#include "apr_strings.h"
#include "apr_fnmatch.h"
#include "apr_lib.h"
#include "apr_pools.h"
#include "apr_want.h"
#include "httpd.h"
#include "http_request.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_main.h"
#include "http_protocol.h"
#include "util_script.h"
#include "stdsoap2.h"
#include "apache_gsoap.h"
Classes | |
struct | SoapSharedLibrary_S |
struct | SoapSharedLibraries_S |
struct | gsoapConfiguration_S |
struct | gsoapRequestConfiguration_S |
Macros | |
#define | __attribute__(__x) |
#define | APR_WANT_STRFUNC |
#define | FALSE 0 |
#define | TRUE ((int)0xffff) |
#define | IOBUF_CHUNK_SIZE 8192 |
#define | GSOAP_ID "Apache 2.0 mod_gsoap gsoap httpd extension 0.0.9" |
#define | DLSYM(a, b) dlsym(a,b) |
#define | DLOPEN(a, b) dlopen(a,b) |
Typedefs | |
typedef int | Bool |
typedef struct SoapSharedLibrary_S | SoapSharedLibrary |
typedef struct SoapSharedLibraries_S | SoapSharedLibraries |
typedef enum enConfigurationType | ConfigurationType |
typedef struct gsoapConfiguration_S | gsoapConfiguration |
typedef struct gsoapRequestConfiguration_S | gsoapRequestConfiguration |
typedef const char *(* | command_function_interface) () |
Enumerations | |
enum | enConfigurationType { ct_server = 1, ct_directory = 2, ct_both = 3 } |
Functions | |
static apr_pool_t * | gsoapConfiguration_getModulePool () |
static gsoapConfiguration * | getConfiguration (request_rec *r) |
static gsoapRequestConfiguration * | getRequestConfiguration (struct soap *) |
static void | SoapSharedLibrary_init (SoapSharedLibrary *This, apr_pool_t *p, const SoapSharedLibrary *pLib) |
static void | SoapSharedLibrary_init2 (SoapSharedLibrary *This, apr_pool_t *p, const char *pszPath) |
static void | SoapSharedLibrary_clear (SoapSharedLibrary *This, apr_pool_t *p) |
static SoapSharedLibrary * | SoapSharedLibrary_create (apr_pool_t *p) |
static const char * | SoapSharedLibrary_load (SoapSharedLibrary *This, apr_pool_t *pTempPool) |
static const char * | SoapSharedLibrary_unload (SoapSharedLibrary *This) |
static void | SoapSharedLibraries_init (SoapSharedLibraries *This, apr_pool_t *p) |
static SoapSharedLibrary * | SoapSharedLibraries_getLibrary (SoapSharedLibraries *This, unsigned nIndex) |
static Bool | SoapSharedLibraries_contains (SoapSharedLibraries *This, const char *pszPath) |
static void | SoapSharedLibraries_addLibrary (SoapSharedLibraries *This, SoapSharedLibrary *pLibrary) |
static const char * | SoapSharedLibraries_getEntryPoints (SoapSharedLibraries *This, SoapSharedLibrary *pLib, apr_pool_t *pTempPool, request_rec *r) |
static const char * | SoapSharedLibraries_loadAllLibraries (SoapSharedLibraries *This, apr_pool_t *pTempPool, request_rec *r) |
static const char * | SoapSharedLibraries_unloadAllLibraries (SoapSharedLibraries *This) |
static void | SoapSharedLibraries_clear (SoapSharedLibraries *This) |
static void | SoapSharedLibraries_merge (SoapSharedLibraries *This, SoapSharedLibraries *pLibs) |
static void | SoapSharedLibraries_merge3 (SoapSharedLibraries *This, SoapSharedLibraries *libraries1, SoapSharedLibraries *libraries2) |
static void | gsoapConfiguration_merge (gsoapConfiguration *This, gsoapConfiguration *pParentConfig, gsoapConfiguration *pNewConfig) |
static void | gsoapConfiguration_init (gsoapConfiguration *This, apr_pool_t *p) |
static gsoapConfiguration * | gsoapConfiguration_create (apr_pool_t *p) |
static int | gsoap_handler (request_rec *r) |
static int | gsoap_init (apr_pool_t *p, apr_pool_t *ptemp, apr_pool_t *plog, server_rec *psrec) |
static void * | gsoap_create_dir_config (apr_pool_t *p, char *dirspec) |
static void * | gsoap_merge_dir_config (apr_pool_t *p, void *parent_conf, void *newloc_conf) |
static void * | gsoap_create_server_config (apr_pool_t *p, server_rec *s) |
static void * | gsoap_merge_server_config (apr_pool_t *p, void *server1_conf, void *server2_conf) |
static Bool | AddSharedLibrary (gsoapConfiguration *pConfig, const char *pszPath, const Bool bIsSOAPLibrary) |
static const char * | cmd_SoapLibrary (cmd_parms *cmd, void *mconfig, const char *pszPath) |
static const char * | cmd_SupportLibrary (cmd_parms *cmd, void *mconfig, const char *pszPath) |
static void | gsoap_hooks (apr_pool_t *p) |
static int | ListHeadersCallback (void *rec, const char *key, const char *value) |
static void | ListHeaders (request_rec *r) |
static void | SendErrorMessage (request_rec *r, const char *pszError) |
static void | HTTPGet_SendWSDL (request_rec *r, const char *path) |
static int | send_header_to_gsoap (void *pvoid, const char *key, const char *value) |
static int | http_post_header (struct soap *soap, const char *key, const char *value) |
static size_t | frecv (struct soap *psoap, char *pBuf, apr_size_t len) |
static int | fsend (struct soap *psoap, const char *pBuf, apr_size_t len) |
static int | http_parse (struct soap *psoap) |
static int | fpoll (struct soap *psoap) |
static int | mod_gsoap_plugin_copy (struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src) |
static void | mod_gsoap_delete (struct soap *soap, struct soap_plugin *p) |
static int | mod_gsoap_plugin (struct soap *soap, struct soap_plugin *p, void *arg) |
static void | set_callbacks (request_rec *r, gsoapRequestConfiguration *pRqConf, struct soap *psoap) |
static void | gsoap_child_init (server_rec *s, apr_pool_t *p) |
static void | gsoap_child_exit (server_rec *s, apr_pool_t *p) |
Variables | |
static char | mod_gsoap_id [] = GSOAP_ID |
static apr_pool_t * | the_gsoapPool = NULL |
static const command_rec | gsoap_cmds [] |
module AP_MODULE_DECLARE_DATA | gsoap_module |
Apache gSOAP module for Apache 2.0
originator: Christian Aberger (http://www.aberger.at) ported to Apache 2.0 by Mick Wall (mick@) updated by Robert van Engelen ( mick andwe ndy. comengel) updated by David Viner ( en@a cm.or gdvine) updated by Ryan Troll (patch removed) updated by La Cam Chung and Robert van Engelen (HTTP GET ?wsdl to get WSDL) r@ap ache. org
Contributed to the gSOAP package under the terms and conditions of the gSOAP public license.
#define __attribute__ | ( | __x | ) |
#define APR_WANT_STRFUNC |
#define DLOPEN | ( | a, | |
b | |||
) | dlopen(a,b) |
#define DLSYM | ( | a, | |
b | |||
) | dlsym(a,b) |
#define FALSE 0 |
#define GSOAP_ID "Apache 2.0 mod_gsoap gsoap httpd extension 0.0.9" |
#define IOBUF_CHUNK_SIZE 8192 |
#define TRUE ((int)0xffff) |
typedef int Bool |
typedef const char*(* command_function_interface) () |
typedef enum enConfigurationType ConfigurationType |
Environment to which record applies (directory, server, or combination).
typedef struct gsoapConfiguration_S gsoapConfiguration |
Store the configuration information set in the Apache Server configuration directives. These are set e.g. in the file httpd.conf It's perfectly reasonable to have two different structures for the two different environments. The same command handlers will be called for both, though, so the handlers need to be able to tell them apart. One possibility is for both structures to start with an int which is zero for one and 1 for the other.
Note that while the per-directory and per-server configuration records are available to most of the module handlers, they should be treated as READ-ONLY by all except the command and merge handlers. Sometimes handlers are handed a record that applies to the current location by implication or inheritance, and modifying it will change the rules for other locations.
typedef struct gsoapRequestConfiguration_S gsoapRequestConfiguration |
Our internal per request soap configuration
typedef struct SoapSharedLibraries_S SoapSharedLibraries |
Table of shared libraries that are already loaded. a singleton.
typedef struct SoapSharedLibrary_S SoapSharedLibrary |
A shared library containing a SOAP server.
enum enConfigurationType |
|
static |
helper funciton for library command handler.
pszPath | the path of the library. |
bIsSOAPLibrary | true if it is a shared library containing a SOAP server. |
|
static |
Command handler for the TAKE1 "SOAPLibrary" directive. We remember the load path for the shared library that contains the SOAP server.
|
static |
Command handler for the TAKE1 "SOAPSupportLibrary" directive. We remember the load path for a shared library that must additionally loaded. This is a mechanism to load libraries that the SOAPLibrary depends on. This type of libraries do not contain our soap server.
|
static |
make sure we go through soap_send_fault(), which calls fpoll
|
static |
gsoap function that requests the next piece of data from us
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
SOAP content handler.
|
static |
List of callback routines and data structures that provide the hooks into our module.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
instead of real header parsing we skip that.
|
static |
|
static |
|
static |
write out the headers of the request.
|
static |
helper to write out the headers
|
static |
|
static |
|
static |
|
static |
|
static |
send the error message to the client browser
|
static |
|
static |
|
static |
|
static |
pszPath | the operating system name of the library. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
p | the apr_pool_tto use for memory allocations. |
pszPath | the path of the library. |
|
static |
|
static |
pTempPool | pool to use for allocating temporary objects (e.g. error message). |
|
static |
|
static |
List of directives specific to our module.
module AP_MODULE_DECLARE_DATA gsoap_module |
|
static |
|
static |