You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andreas Veithen (Updated) (JIRA)" <ji...@apache.org> on 2011/10/16 10:16:11 UTC
[jira] [Updated] (AXIS2-4387) Underlying Stax Reader left in a
faulty state when sending MTOM attachments
[ https://issues.apache.org/jira/browse/AXIS2-4387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated AXIS2-4387:
-----------------------------------
Fix Version/s: 1.5.7
> Underlying Stax Reader left in a faulty state when sending MTOM attachments
> ---------------------------------------------------------------------------
>
> Key: AXIS2-4387
> URL: https://issues.apache.org/jira/browse/AXIS2-4387
> Project: Axis2
> Issue Type: Bug
> Components: adb
> Affects Versions: 1.4.1
> Reporter: Hans Peter
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: 1.6.0, 1.5.7
>
> Attachments: schema_snippet.xml
>
>
> When sending requests to an endpoint generated by ADB databinding a parsing error occurs. The generated ADB classes seems to consume too few tokens from the XML reader when data is sent in with MTOM. The same test-requests works fine when inlining attachments as base64 encoded strings.
> I have attached the relevant part of the schema that was used when i encountered the bug.
> What I have done as a workaround is to make the change in the generated code in IndexFile.Factory#parse(XmlStreamReader). The added line to fix the problem is marked with (THIS IS THE FIX)
> if (reader.isStartElement() && new javax.xml.namespace.QName(
> "http://ssa.stockholm.se/",
> "Content").equals(reader.getName()))
> {
> reader.next();
> if (isReaderMTOMAware(reader)
> &&
> java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_BINARY)))
> {
> //MTOM aware reader - get the datahandler directly and put it in the object
> object.setContent(
> (javax.activation.DataHandler) reader.getProperty(org.apache.axiom.om.OMConstants.DATA_HANDLER));
> while (!reader.isEndElement()) reader.next(); // Read until end content (THIS IS THE FIX)
> }
> else
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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