Hi List, We have a very large code inside both axis2_apache2_worker_process_request and axis2_iis_worker_process_request methods. Both these codes are similar and use the same logic. It is hard to maintain the same code in may places and I would like to suggest to move the common logic in to the http_transport_utils.c.
In oder to introduce a common method we need to pass lot of information from the HTTP servers to this new method. We can do this by introducing a new structure. typedef struct { int content_lenght; axis2_char_t *url; axis2_char_t *http_method; axis2_conf_ctx_t *conf_ctx; axis2_char_t *soap_action; void *stream; /* There may be lot of other fields */ } axis2_tranport_in_t; Also we need a method to give what ever the processed information back to the transport level. We can introduce another structure to do that typedef struct { void *stream; int status; axis2_char_t *custom_error_messages; /* There may be other fields, feel free to comment on them */ } axis2_tranport_out_t; So the Transport writers can fill this structure and give it to the method axis2_status_t axis2_http_tranport_utils_process_request(axutil_env_t *env, const axis2_transport_in_t *tr_in, axutil_tranport_out_t *tr_our); for processing. This method will fill the axutil_tranport_out_t and give it back to the transport layer. Also we shouldn't add respective getter and setter fields to these structures, since we are using these structures for information exchange between two methods. This is the rough idea that came into my mind and I'm sure all of you may have better ideas than me -). Regards, Supun..