You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Thilina Gunarathne (JIRA)" <ji...@apache.org> on 2008/12/18 14:37:44 UTC

[jira] Created: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Axiom MIME parser does not support MIME parts without content-id's
------------------------------------------------------------------

                 Key: WSCOMMONS-418
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
             Project: WS-Commons
          Issue Type: Improvement
          Components: AXIOM
            Reporter: Thilina Gunarathne
            Assignee: Thilina Gunarathne
         Attachments: axiom_mixed_content_patch.txt

Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 

But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 

Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...

WDYT?



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


[jira] Commented: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662837#action_12662837 ] 

Thilina Gunarathne commented on WSCOMMONS-418:
----------------------------------------------

Regarding your first comment,
* Axis2 does support unreferenced MIME parts
* We have documented the behavior that Axis2 does not support Content-Location based MIME part addressing.

I agree that the API's we have at the moment for attachment handling are suboptimal, specially given that Axiom/axis2 MIME handling API's were designed initially to support only MTOM.   Then later we added SwA , SAAJ and mail transport on top it making things far more complicated.. I'm sure a careful design, while having all the requirements on table, will lead us to a cleaner solution. We should also try to integrate mime4j as an option too..

My only concerns are,
1. I no longer have free cycles for a big change and to maintain it till it gets stabilized :)... But I'm always willing to give a hand if somebody is going to take this up.
2. Backward compatibility & code stability issues. 



> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Updated: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Peter Schi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Schi updated WSCOMMONS-418:
---------------------------------

    Comment: was deleted

(was: A comment with security level 'jira-users' was removed.)

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Updated: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated WSCOMMONS-418:
--------------------------------------

    Fix Version/s: Axiom 1.2.10
                       (was: Axiom 1.2.9)

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.10
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Updated: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated WSCOMMONS-418:
--------------------------------------

    Fix Version/s: Axiom 1.2.9
       Issue Type: Bug  (was: Improvement)

This is actually not only relevant for the mail transport, because the SwA specification doesn't require the presence of a Content-Id header in each attachment. Indeed, the spec says:

[quote] A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. [...] The primary SOAP 1.1 message in a message package may reference the additional entities. [...]

Referenced MIME parts must contain either a Content-ID MIME header structured in accordance with RFC 2045, or a Content-Location MIME header structured in accordance with RFC 2557.[/quote]

Thus the specification clearly allows attachments that are not referenced by the SOAP message, and these attachments are not required to have Content-Id headers. The behavior you describe therefore violates the SwA spec and should be considered as a bug.

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Commented: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662839#action_12662839 ] 

Thilina Gunarathne commented on WSCOMMONS-418:
----------------------------------------------

Also your concerns are exactly the reason  why I did not commit the code directly too...

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Issue Comment Edited: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Peter Schi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772304#action_12772304 ] 

Peter Schi edited comment on WSCOMMONS-418 at 11/1/09 6:47 AM:
---------------------------------------------------------------

Thillina, 
as you said that Axis2 does support unreferenced MIME parts, do you have the sample code ?
Thanks!

  
> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Updated: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilina Gunarathne updated WSCOMMONS-418:
-----------------------------------------

    Attachment: axiom_mixed_content_patch.txt

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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


[jira] Commented: (WSCOMMONS-418) Axiom MIME parser does not support MIME parts without content-id's

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662824#action_12662824 ] 

Andreas Veithen commented on WSCOMMONS-418:
-------------------------------------------

Thilina,

The question is if we should (as you propose in your patch) simply generate IDs for attachments that don't have Content-IDs. An alternative would be:

1) Clean up the org.apache.axiom.attachments.Part, in particular remove deprecated methods and decouple it from JavaMail. Note that as far as I can see, this interface is currently not really part of the public API of Axiom but only used internally.

2) Enhance the Attachments class to allow client code to retrieve the attachments as a sequence of Part instances (with parts not required to have Content-IDs). Note that this implies that Part becomes part of the public Axiom API.

The additional benefit of this would be that it gives access to all the MIME headers of the attachments. This might e.g. be required to provide a full SAAJ implementation in Axis2.

> Axiom MIME parser does not support MIME parts without content-id's
> ------------------------------------------------------------------
>
>                 Key: WSCOMMONS-418
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-418
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Thilina Gunarathne
>            Assignee: Thilina Gunarathne
>             Fix For: Axiom 1.2.9
>
>         Attachments: axiom_mixed_content_patch.txt
>
>
> Axiom MIME parser does the content-id validation for the MIME parts as required by MTOM & SwA..Also the Attachments API is designed as a map (content-id, attachment) with this assumption.. 
> But now the mail transport is going to use the same MIME parser and they have valid messages which does not have content-id's for MIME parts. But IMHO trying to generalize all axiom/Axis2 attachment API's would be a too much of an API change at this point of the project... 
> Attached is a quick patch to generate a UUID in place of the missing content-id... But with this we are going to miss the content-id validation...
> WDYT?

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