[ 
https://issues.apache.org/jira/browse/AXIS2C-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Russell Tempero updated AXIS2C-1417:
------------------------------------

    Attachment: axis_changes.diff

Here are the changes that we made to support our desired functionality.

> ability to add an MTOM sending callback without requiring a module
> ------------------------------------------------------------------
>
>                 Key: AXIS2C-1417
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1417
>             Project: Axis2-C
>          Issue Type: New Feature
>          Components: mtom
>    Affects Versions: 1.6.0
>         Environment: $ gcc --version
> gcc (GCC) 4.2.2
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> $ ld --version
> GNU ld version 2.17.50.0.6-2.el5 20061020
> Copyright 2005 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License.  This program has absolutely no warranty.
> $ uname -a
> Linux <hostname> 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT 2007 x86_64 
> x86_64 x86_64 GNU/Linux
>            Reporter: Russell Tempero
>         Attachments: axis_changes.diff
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> We wanted to be able to specify our own set of functions for reading file 
> data which is currently supported in Axis2 via sending callback modules. 
> However, we did not want the inefficiency associated with loading another 
> dynamic library. Our solution was to alter the Axis code to allow us to 
> achieve the same functionality by only passing a few function pointers.
> Note that we also added support for using the callback handlers to send file 
> attachments as non-MTOM (base-64 encoded) data. See changes to data_handler.c.
> Some suggested further changes:
> - add a case to axiom_data_handler_read_from() for 
> AXIOM_DATA_HANDLER_TYPE_CALLBACK that works similarly to my addition for 
> AXIOM_DATA_HANDLER_TYPE_HANDLER. This will allow traditional call back 
> handlers (those loaded via a module) can be used to send non-MTOM data.
> - alter axiom_data_handler_read_from() to work even if the "data_size" 
> function is not specified. My idea was to check if this function is not 
> specified or if it returns some special value (i.e. a negative number). If 
> so, a much less efficient, brute-force method could be employed to determine 
> the size of the data. One way would be to iterate once through the data, only 
> counting the size and throwing away the actual data. Then create a buffer of 
> the proper size and iterate a second time through the data while filling the 
> buffer.
> Hopefully this patch is useful.
> Thanks,
> Russell

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to