axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Peter (JIRA)" <>
Subject [jira] Updated: (AXIS2-4387) Underlying Stax Reader left in a faulty state when sending MTOM attachments
Date Wed, 17 Jun 2009 13:06:07 GMT


Hans Peter updated AXIS2-4387:

    Attachment: schema_snippet.xml

There's descriptions on which scenarios that actually do work in the schema_snippet.xml file
and which scenarios that do not work. 

I presume that: if no new start elements occurs on the input after the Content element then
everything seems to work just fine.

> Underlying Stax Reader left in a faulty state when sending MTOM attachments
> ---------------------------------------------------------------------------
>                 Key: AXIS2-4387
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>            Reporter: Hans Peter
>            Priority: Minor
>         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
> I have attached the relevant part of the schema that was used when i encountered the
> 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(
>                     "",
>                     "Content").equals(reader.getName()))
>                 {
>           ;
>                     if (isReaderMTOMAware(reader)
>                         &&
>                         java.lang.Boolean.TRUE.equals(reader.getProperty(
>                     {
>                         //MTOM aware reader - get the datahandler directly and put it
in the object
>                         object.setContent(
>                             (javax.activation.DataHandler) reader.getProperty(;
>                         while (!reader.isEndElement()); // Read until end
content (THIS IS THE FIX)
>                     }
>                     else

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

View raw message