You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/09/07 12:29:47 UTC
svn commit: r573531 - in
/webservices/axis2/trunk/c/src/core/transport/http/server:
apache2/mod_axis2.c simple_axis2_server/http_server_main.c
Author: samisa
Date: Fri Sep 7 03:29:45 2007
New Revision: 573531
URL: http://svn.apache.org/viewvc?rev=573531&view=rev
Log:
Fixed the service prefix problems
Modified:
webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
webservices/axis2/trunk/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c
Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c?rev=573531&r1=573530&r2=573531&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c Fri Sep 7 03:29:45 2007
@@ -64,6 +64,12 @@
void *dummy,
const char *arg);
+static const char *
+axis2_set_svc_url_prefix(
+ cmd_parms *cmd,
+ void *dummy,
+ const char *arg);
+
static int
axis2_handler(
request_rec *req);
@@ -99,6 +105,8 @@
"Axis2/C log file name"),
AP_INIT_TAKE1("Axis2LogLevel", axis2_set_log_level, NULL, RSRC_CONF,
"Axis2/C log level"),
+ AP_INIT_TAKE1("Axis2ServiceURLPrefix", axis2_set_svc_url_prefix, NULL, RSRC_CONF,
+ "Axis2/C service URL prifix"),
{NULL}
};
@@ -138,7 +146,6 @@
{
return err;
}
-
conf = (axis2_config_rec_t*)ap_get_module_config(
cmd->server->module_config, &axis2_module);
conf->axis2_repo_path = apr_pstrdup(cmd->pool, arg);
@@ -213,17 +220,37 @@
return NULL;
}
+static const char *
+axis2_set_svc_url_prefix(
+ cmd_parms *cmd,
+ void *dummy,
+ const char *arg)
+{
+ AXIS2_IMPORT extern axis2_char_t *axis2_request_url_prefix;
+ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+ axis2_request_url_prefix = AXIS2_REQUEST_URL_PREFIX;
+ if (!err)
+ {
+ axis2_char_t *prefix = apr_pstrdup(cmd->pool, arg);
+ if (prefix)
+ axis2_request_url_prefix = prefix;
+ }
+
+ return NULL;
+}
+
/* The sample content handler */
static int
axis2_handler(
request_rec *req)
{
int rv = 0;
+
if (strcmp(req->handler, "axis2_module"))
{
return DECLINED;
}
-
/* Set up the read policy from the client.*/
if ((rv = ap_setup_client_block(req, REQUEST_CHUNKED_DECHUNK)) != OK)
{
Modified: webservices/axis2/trunk/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c?rev=573531&r1=573530&r2=573531&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c Fri Sep 7 03:29:45 2007
@@ -31,6 +31,7 @@
axutil_env_t *system_env = NULL;
axis2_transport_receiver_t *server = NULL;
AXIS2_IMPORT extern int axis2_http_socket_read_timeout;
+AXIS2_IMPORT extern axis2_char_t *axis2_request_url_prefix;
/***************************** Function headers *******************************/
axutil_env_t *
init_syetem_env(
@@ -98,6 +99,10 @@
const axis2_char_t *log_file = "axis2.log";
int port = 9090;
const axis2_char_t *repo_path = "../";
+
+ /* Set the service URL prefix to be used. This could default to services if not
+ set with AXIS2_REQUEST_URL_PREFIX macro at compile time */
+ axis2_request_url_prefix = AXIS2_REQUEST_URL_PREFIX;
while ((c = AXIS2_GETOPT(argc, argv, ":p:r:ht:l:f:")) != -1)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org