axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandika Jayawardana" <jayaw...@gmail.com>
Subject Re: Moving axis2_*iis/apache2*_worker_process_request logic to a common place - Correct mail
Date Thu, 05 Jun 2008 15:26:44 GMT
+1. I think this is a good approach. I think we should have the
message context as  a member variable in both of these variables. In
that way, what ever the module specific information can be passed
through message context.  Since this is specific to http, I think
these two structures should rather be axis2_http_transport_in and
axis2_http_transport_out.

1+ for not having getter setter functions.

Regards
Nandika

On Thu, Jun 5, 2008 at 2:02 PM, Supun Kamburugamuva <supun06@gmail.com> wrote:
> 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..
>
>



-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message