axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r409350 - in /webservices/axis2/trunk/c: axiom/include/axis2_mime_parser.h axiom/src/attachments/mime_parser.c modules/core/transport/http/http_transport_utils.c
Date Thu, 25 May 2006 10:03:58 GMT
Author: samisa
Date: Thu May 25 03:03:55 2006
New Revision: 409350

URL: http://svn.apache.org/viewvc?rev=409350&view=rev
Log:
Fixes related to mime parser to fix build break

Modified:
    webservices/axis2/trunk/c/axiom/include/axis2_mime_parser.h
    webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c

Modified: webservices/axis2/trunk/c/axiom/include/axis2_mime_parser.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axis2_mime_parser.h?rev=409350&r1=409349&r2=409350&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axis2_mime_parser.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axis2_mime_parser.h Thu May 25 03:03:55 2006
@@ -76,6 +76,11 @@
     get_soap_body_len)(
         axis2_mime_parser_t *mime_parser, 
         axis2_env_t **env);
+        
+    axis2_char_t* (AXIS2_CALL *
+    get_soap_body_str)(
+        axis2_mime_parser_t *mime_parser, 
+        axis2_env_t **env);
 };
 
 /** 
@@ -99,7 +104,7 @@
 #define AXIS2_MIME_PARSER_FREE(mime_parser, env) \
 ((mime_parser)->ops->free (mime_parser, env))
 
-#define AXIS2_MIME_PARSER_PARSE(mime_parser, env, callback) \
+#define AXIS2_MIME_PARSER_PARSE(mime_parser, env, callback, callback_ctx, mime_boundary)
\
 ((mime_parser)->ops->parse(mime_parser, env, callback, callback_ctx, mime_boundary))
 
 #define AXIS2_MIME_PARSER_GET_MIME_PARTS_MAP(mime_parser, env) \
@@ -107,6 +112,9 @@
 
 #define AXIS2_MIME_PARSER_GET_SOAP_BODY_LENGTH(mime_parser, env) \
 ((mime_parser)->ops->get_soap_body_len(mime_parser, env))
+
+#define AXIS2_MIME_PARSER_GET_SOAP_BODY_STR(mime_parser, env) \
+((mime_parser)->ops->get_soap_body_str(mime_parser, env))
 
 /*************************** End of function macros ***************************/
 

Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c?rev=409350&r1=409349&r2=409350&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c Thu May 25 03:03:55 2006
@@ -23,6 +23,7 @@
 	axis2_mime_parser_t mime_parser;
     axis2_hash_t *mime_parts_map;
     int soap_body_len;
+    axis2_char_t* soap_body_str;
 } axis2_mime_parser_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(mime_parser) ((axis2_mime_parser_impl_t *)(mime_parser))
@@ -49,6 +50,11 @@
 axis2_mime_parser_get_soap_body_len(axis2_mime_parser_t *mime_parser, 
     axis2_env_t **env);
 
+axis2_char_t* AXIS2_CALL
+axis2_mime_parser_get_soap_body_str(axis2_mime_parser_t *mime_parser, 
+    axis2_env_t **env);
+
+
 /************************** End of Function headers ************************/
 
 AXIS2_DECLARE(axis2_mime_parser_t *)
@@ -69,6 +75,7 @@
     mime_parser_impl->mime_parser.ops = NULL;
     mime_parser_impl->mime_parts_map = NULL;
     mime_parser_impl->soap_body_len = 0;
+    mime_parser_impl->soap_body_str = NULL; /* shallow copy */
     
     mime_parser_impl->mime_parts_map = axis2_hash_make(env);
     if (!(mime_parser_impl->mime_parts_map))
@@ -353,6 +360,7 @@
         if (soap_body_str) 
         {
             mime_parser_impl->soap_body_len = soap_body_len;
+            mime_parser_impl->soap_body_str = soap_body_str;
             /* create a basic stream with soap string to pull SOAP */
             /*axis2_stream_t *stream = axis2_stream_create_basic(env);
             if (stream)
@@ -427,4 +435,12 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     return AXIS2_INTF_TO_IMPL(mime_parser)->soap_body_len;
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_mime_parser_get_soap_body_str(axis2_mime_parser_t *mime_parser, 
+    axis2_env_t **env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    return AXIS2_INTF_TO_IMPL(mime_parser)->soap_body_str;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?rev=409350&r1=409349&r2=409350&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Thu May 25
03:03:55 2006
@@ -203,15 +203,18 @@
             axis2_mime_parser_t *mime_parser = NULL;
             axis2_stream_t *stream = NULL;
             int soap_body_len = 0;
+            axis2_char_t* soap_body_str = NULL;
             
             mime_parser = axis2_mime_parser_create(env);
             if (mime_parser)
             {
                 binary_data_map = AXIS2_MIME_PARSER_PARSE(mime_parser, env, 
                     axis2_http_transport_utils_on_data_request, 
-                    callback_ctx, mime_boundary);
+                    (void*)&callback_ctx, mime_boundary);
                 
                 soap_body_len = AXIS2_MIME_PARSER_GET_SOAP_BODY_LENGTH(
+                    mime_parser, env);
+                soap_body_str = AXIS2_MIME_PARSER_GET_SOAP_BODY_STR(
                     mime_parser, env);
             }
             



---------------------------------------------------------------------
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