axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r629045 - /webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
Date Tue, 19 Feb 2008 09:24:14 GMT
Author: manjula
Date: Tue Feb 19 01:24:11 2008
New Revision: 629045

URL: http://svn.apache.org/viewvc?rev=629045&view=rev
Log:
Getting the chunk buffer size for axis2_params.

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c?rev=629045&r1=629044&r2=629045&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c Tue Feb
19 01:24:11 2008
@@ -324,15 +324,49 @@
         {
             axiom_mime_parser_t *mime_parser = NULL;
             int soap_body_len = 0;
+            axutil_param_t *chunk_buffer_size_param = NULL;
+            axutil_param_t *max_chunk_buffers_param = 0;
+            axis2_char_t *value_size = NULL;
+            axis2_char_t *value_num = NULL;
+            int size = 0;
+            int num = 0;
 
             mime_parser = axiom_mime_parser_create(env);
+
+            chunk_buffer_size_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_CHUNK_BUFFER_SIZE);
+            if (chunk_buffer_size_param)
+            {
+                value_size =
+                    (axis2_char_t *) axutil_param_get_value (chunk_buffer_size_param, env);
+                if(value_size)
+                {
+                    size = atoi(value_size);
+                    axiom_mime_parser_set_chunk_buffer_size(mime_parser, env, size);
+                }
+            }
+
+            max_chunk_buffers_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_MAX_CHUNK_BUFFERS);
+            if(max_chunk_buffers_param)
+            {
+                value_num =
+                    (axis2_char_t *) axutil_param_get_value (max_chunk_buffers_param, env);
+                if(value_num)
+                {
+                    num = atoi(value_num);
+                    axiom_mime_parser_set_max_chunk_buffers(mime_parser, env, num);
+                }
+            }
+
             if (mime_parser)
             {
                 binary_data_map = axiom_mime_parser_parse(mime_parser, env,
                                                           axis2_http_transport_utils_on_data_request,
                                                           (void *) callback_ctx,
                                                           mime_boundary);
-
                 soap_body_len =
                     axiom_mime_parser_get_soap_body_len(mime_parser, env);
                 soap_body_str =
@@ -686,8 +720,43 @@
         {
             axiom_mime_parser_t *mime_parser = NULL;
             int soap_body_len = 0;
+            axutil_param_t *chunk_buffer_size_param = NULL;
+            axutil_param_t *max_chunk_buffers_param = 0;
+            axis2_char_t *value_size = NULL;
+            axis2_char_t *value_num = NULL;
+            int size = 0;
+            int num = 0;
 
             mime_parser = axiom_mime_parser_create(env);
+
+            chunk_buffer_size_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_CHUNK_BUFFER_SIZE);
+            if (chunk_buffer_size_param)
+            {
+                value_size =
+                    (axis2_char_t *) axutil_param_get_value (chunk_buffer_size_param, env);
+                if(value_size)
+                {
+                    size = atoi(value_size);
+                    axiom_mime_parser_set_chunk_buffer_size(mime_parser, env, size);
+                }
+            }
+
+            max_chunk_buffers_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_MAX_CHUNK_BUFFERS);
+            if(max_chunk_buffers_param)
+            {
+                value_num =
+                    (axis2_char_t *) axutil_param_get_value (max_chunk_buffers_param, env);
+                if(value_num)
+                {
+                    num = atoi(value_num);
+                    axiom_mime_parser_set_max_chunk_buffers(mime_parser, env, num);
+                }
+            }
+
             if (mime_parser)
             {
                 binary_data_map = axiom_mime_parser_parse(mime_parser, env,
@@ -1703,15 +1772,49 @@
             axutil_stream_t *stream = NULL;
             int soap_body_len = 0;
             axis2_char_t *soap_body_str = NULL;
-
+            axutil_param_t *chunk_buffer_size_param = NULL;
+            axutil_param_t *max_chunk_buffers_param = 0;
+            axis2_char_t *value_size = NULL;
+            axis2_char_t *value_num = NULL;
+            int size = 0;
+            int num = 0;
+ 
             mime_parser = axiom_mime_parser_create(env);
+
+            chunk_buffer_size_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_CHUNK_BUFFER_SIZE);
+            if (chunk_buffer_size_param)
+            {
+                value_size =
+                    (axis2_char_t *) axutil_param_get_value (chunk_buffer_size_param, env);
+                if(value_size)
+                {
+                    size = atoi(value_size);
+                    axiom_mime_parser_set_chunk_buffer_size(mime_parser, env, size);
+                }
+            }
+
+            max_chunk_buffers_param = axis2_msg_ctx_get_parameter (msg_ctx,
+                                                               env,
+                                                               AXIS2_MTOM_MAX_CHUNK_BUFFERS);
+            if(max_chunk_buffers_param)
+            {
+                value_num =
+                    (axis2_char_t *) axutil_param_get_value (max_chunk_buffers_param, env);
+                if(value_num)
+                {
+                    num = atoi(value_num);
+                    axiom_mime_parser_set_max_chunk_buffers(mime_parser, env, num);
+                }
+            }
+            
             if (mime_parser)
             {
                 binary_data_map = axiom_mime_parser_parse(mime_parser, env,
                                                           axis2_http_transport_utils_on_data_request,
                                                           (void *) callback_ctx,
                                                           mime_boundary);
-
                 soap_body_len =
                     axiom_mime_parser_get_soap_body_len(mime_parser, env);
                 soap_body_str =



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


Mime
View raw message