On Dec 4, 2007 9:50 AM, Thilina Gunarathne <[EMAIL PROTECTED]> wrote:
> > > In the case of Axis2/Java, OMText.getText() always gives a string
> > > representation of the content. If the content is Binary, it'll
> > > automatically base64 encode it..
> > So this means the optimization is turned OFF. Basically its the approach
> > #2 as I suggested. Correct me if I'm wrong.
> oh.. ok.. I understood it other wise earlier... :)
>
> In the case of Axis2/java there is not need to set optimization to
> false.. The getText() always gives a text representation of the
> content, while getDataHandler() gives a Binary content if there is
> any...
>
> For an example if MTOM is disabled at the transport level and if there
> are optimised parts in the message, Axis2/java sends them as base64
> automatically... It just calls getText() if MTOM is not enabled...
>
> > -Kau
> >
> > >  Axis2/Java security only needs to
> > > call the OMText.getText(), irrespective of whether it's a binary or
> > > normal text..This method also conforms to the MTOM spec, as it describes 
> > > MTOM as
> > > selectively encoding of binary data either as base64 or as XOP MIME
> > > attachments.
> > >

get_text() always returns the base64 in axis2/c too. In addition there
is also a get_data_handler() function which returns the data handler.
But the problem here that I see, is that we use axiom_node_to_string()
which optimizes the output xml, if MTOM optimized flag is set on a
text node. (Correct me if I'm wrong)

So the solution here would be either to do it as Kaushalye explained
in #2 or to use a different serialization function which ignores the
MTOM optimized flag, I guess.

Regards,
-Dumindu.

-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to