axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (AXIS2-4991) Axis2 Local Transport puts the whole response envelope to message body
Date Sun, 15 May 2011 12:51:47 GMT

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

Andreas Veithen reopened AXIS2-4991:
------------------------------------


This change has several issues and needs to be reviewed:

1. BuilderUtil#getBuilder(Reader) is deprecated, and there is a reason for that (see below).
The method should not be used.

2. As indicated in the Javadoc, the InputStreamReader(InputStream) constructor uses the default
charset, which is platform dependent and not necessarily the same as the default charset used
by XML (UTF-8). The code will almost certainly fail if the message contains non-ASCII characters.
[Note that I'm not saying that the previous version of LocalResponder did that correctly]

3. When an XML message is available as byte stream, it is generally a bad practice to convert
it to a character stream yourself instead of letting the parser handle this (see e.g. [1]
under "Let Woodstox handle input conversions"). This is probably the reason why the method
mentioned in item 1 is deprecated. Passing a character stream to an XML parser is only useful
if the message comes from a source that uses characters directly (e.g. a String literal, a
JMS TextMessage, a database CLOB or an XML message extracted from an xsd:string value of another
XML message).

[1] http://woodstox.codehaus.org/Performance

> Axis2 Local Transport puts the whole response envelope to message body
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4991
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4991
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: nightly
>            Reporter: Paul Hodchenkov
>             Fix For: 1.6.0, nightly
>
>         Attachments: AXIS2-4991-patch-1_6_branch.diff, AXIS2-4991-patch.diff
>
>
> BuilderUtil.getBuilder(bs) in LocalResponder.getEnvelope uses StAXOMBuilder instead of
StAXSOAPModelBuilder which causes TransportUtils.createSOAPEnvelope to wrap envelope with
envelope wrapper again.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message