You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2011/08/22 10:17:29 UTC

[jira] [Commented] (AXIOM-383) MTOM has problems when I create an attachtment from a byte array of zero elements

    [ https://issues.apache.org/jira/browse/AXIOM-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088564#comment-13088564 ] 

Hudson commented on AXIOM-383:
------------------------------

Integrated in ws-axiom-trunk #505 (See [https://builds.apache.org/job/ws-axiom-trunk/505/])
    Avoid the call to Part#getSize() because this requires buffering of the part, which prevents us from implementing streaming (AXIOM-377) properly.

The code was introduced by AXIOM-383 but is actually unnecessary:
* The buffering logic works well with with empty attachments.
* The case where "the stream end[s] without having a MIME message terminator" is irrelevant because such a message should generate an exception.
Added a regression test for AXIOM-383.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/mtom/zero-length-attachment.bin


> MTOM has problems when I create an attachtment from a byte array of zero elements
> ---------------------------------------------------------------------------------
>
>                 Key: AXIOM-383
>                 URL: https://issues.apache.org/jira/browse/AXIOM-383
>             Project: Axiom
>          Issue Type: Bug
>    Affects Versions: 1.2.5
>         Environment: Windows XP SP2, Tomcat 6.0
>            Reporter: Jorge Fernández
>            Assignee: Rich Scheuerle
>             Fix For: 1.2.6
>
>         Attachments: message1.txt
>
>
> If I define a DataHandler from an ByteArrayDataSource and this one from a byte array of zero elements, I get the following exception in the client:
> org.apache.axis2.AxisFault: Referenced Attachment not found in the MIME Message. ContentID:1.urn:uuid:0549F3F826EC3041861188639371827@apache.org
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:50213)
> at client.Medici_LinkStub.getSignalData(Medici_LinkStub.java:6500)
> at client.ClientUtilities.getSignalDataTest(ClientUtilities.java:600)
> at client.Client.main(Client.java:172)
> Caused by: org.apache.axiom.om.OMException: Referenced Attachment not found in the MIME Message.
> ContentID:1.urn:uuid:0549F3F826EC3041861188639371827@apache.org
> at org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:106)Closing
> session...
> at client.Medici_LinkStub$ExtDataSegment$Factory.parse(Medici_LinkStub.java:34167)
> at client.Medici_LinkStub$ExtSignalData$Factory.parse(Medici_LinkStub.java:35862)
> at client.Medici_LinkStub$GetSignalDataResponse$Factory.parse(Medici_LinkStub.java:8777)
> at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:49766)
> ... 3 more

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

       

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