diff options
author | damitha | 2010-07-07 16:34:18 +0000 |
---|---|---|
committer | damitha | 2010-07-07 16:34:18 +0000 |
commit | 4a01960cba446e046d5687279c024fa60b576d85 (patch) | |
tree | e0461698d7d9cff78dd0bf3c74f60f8893aacff5 /src | |
parent | f0fa69a1c2a56aa4ead152afd875bdfe1f92d253 (diff) | |
download | axis2c-4a01960cba446e046d5687279c024fa60b576d85.tar.gz axis2c-4a01960cba446e046d5687279c024fa60b576d85.tar.bz2 |
Patch in AXIS2C-1417 applied
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@961429 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/core/transport/http/util/http_transport_utils.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/core/transport/http/util/http_transport_utils.c b/src/core/transport/http/util/http_transport_utils.c index 552cde5..90acc60 100644 --- a/src/core/transport/http/util/http_transport_utils.c +++ b/src/core/transport/http/util/http_transport_utils.c @@ -3256,7 +3256,37 @@ axis2_http_transport_utils_send_mtom_message( AXIS2_FREE(env->allocator, output_buffer); fclose(f); } + else if((mime_part->type) == AXIOM_MIME_PART_HANDLER) + { + void *handler_data = NULL; + axiom_mtom_sending_callback_t *callback = NULL; + + status = mime_part->read_handler_create(&callback, env); + + if(callback) + { + handler_data = AXIOM_MTOM_SENDING_CALLBACK_INIT_HANDLER(callback, env, + mime_part->user_param); + + if (handler_data) + { + status = axis2_http_transport_utils_send_attachment_using_callback(env, + chunked_stream, callback, handler_data, mime_part->user_param); + } + else + { + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "MTOM Sending Handler loading failed"); + status = AXIS2_FAILURE; + } + mime_part->read_handler_remove(callback, env); + } + + if(status == AXIS2_FAILURE) + { + return status; + } + } /* if the callback is given, send data using callback */ else if((mime_part->type) == AXIOM_MIME_PART_CALLBACK) { |