> Then I run the 'echo' sample (that is, I build the echo client and > service samples, deployed the service within the httpd environmet and > run the client), everything looks OK so far but in the httpd log I see > following lines (one line per the request: when I run 1000 iterations > of the echo client, I see 1000 such lines in the apache error log): > > [Wed May 7 11:22:32 2008] [error] string.c(47) NULL parameter was > passed when a non NULL parameter was expected >
I found a place where this error message originates. It is in function called axis2_apache2_worker_process_request() (file src/core/transport/http/server/apache2/apache2_worker.c), when it tries to create a axutil_string_t from the soap action header. If the header is not present (the apr_table_get() returns NULL), this NULL is passed directly to the axutil_string_create() function that prints then this error message in the apache error log and returns NULL. I looked at the code to see how the value returned from the axutil_string_create() here (variable soap_header) is used, it looks like it is OK to have the value of this variable NULL: in all subsequent actions, including in the functions axis2_http_transport_utils_process_http_[*]_request() that the soap_action is passed as a parameter to, there is a check present if this value is NULL, and something sensible happens if it it so. So I changed the code a bit to check if the apr_table_get() returns here NULL before the axutil_string_create() is called. Then I build the Axis2C again, and run the service and the client - this time there are no such error messages in the Apache log file. If anyone is interested, here is a patch: diff -ru axis2c-src-1.4.0-orig/src/core/transport/http/server/apache2/apache2_worker.c axis2c-src-1.4.0/src/core/transport/http/server/apache2/apache2_worker.c --- axis2c-src-1.4.0-orig/src/core/transport/http/server/apache2/apache2_worker.c 2008-03-24 00:39:47.000000000 -0400 +++ axis2c-src-1.4.0/src/core/transport/http/server/apache2/apache2_worker.c 2008-05-08 11:12:12.000000000 -0400 @@ -173,6 +173,7 @@ axis2_char_t *accept_charset_header_value = NULL; axis2_char_t *accept_language_header_value = NULL; axis2_char_t *content_language_header_value = NULL; + axis2_char_t *soap_action_hreader_txt = NULL; AXIS2_ENV_CHECK(env, AXIS2_CRITICAL_FAILURE); AXIS2_PARAM_CHECK(env->error, request, AXIS2_CRITICAL_FAILURE); @@ -388,10 +389,24 @@ } } - soap_action = axutil_string_create(env, - (axis2_char_t *) apr_table_get(request-> - headers_in, - AXIS2_HTTP_HEADER_SOAP_ACTION)); + + soap_action = NULL; + soap_action_hreader_txt = + (axis2_char_t *) apr_table_get(request->headers_in, + AXIS2_HTTP_HEADER_SOAP_ACTION); + if (soap_action_hreader_txt != NULL) + { + soap_action = axutil_string_create(env, soap_action_hreader_txt); + } + + /* + * was: + * soap_action = axutil_string_create(env, + * (axis2_char_t *) apr_table_get(request-> + * headers_in, + * AXIS2_HTTP_HEADER_SOAP_ACTION)); + */ + request_body = axutil_stream_create_apache2(env, request); if (!request_body) { Thank you, alex. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]