cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinhua Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4570) Attachment Header Content-ID conversion
Date Wed, 17 Oct 2012 11:08:03 GMT

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

Jinhua Wang commented on CXF-4570:
----------------------------------

There are two attachment implementation classes, one is from cxf framework and another if
from jdk. "Content-ID" is stored in *id* field in cxf implementation. On the contrary "Content-ID"
is stroed in "headers" in jdk implementation.
*org.apache.cxf.attachment.AttachmentImpl*(cxf framework)
{code}
private String id;
private Map<String, String> headers = new HashMap<String, String>();
{code}

*com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl*
{code}
private final MimeHeaders headers;
public void setMimeHeader(String paramString1, String paramString2) {
    this.headers.setHeader(paramString1, paramString2);
  }

  public void addMimeHeader(String paramString1, String paramString2) {
    this.headers.addHeader(paramString1, paramString2);
  }
{code}
*javax.xml.soap.MimeHeaders*
{code}
private Vector headers;
{code}

When copying content from cxf attachment to jdk attachment, both "Content-ID" values are copied
to *Vector headers*.


                
> Attachment Header Content-ID conversion
> ---------------------------------------
>
>                 Key: CXF-4570
>                 URL: https://issues.apache.org/jira/browse/CXF-4570
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Jinhua Wang
>         Attachments: AttachmentUtil.java.patch
>
>
> I have a migrating problem for headers in attachment. 
> For example, the message sent out contains Content-ID:<foo>,
> Content-ID header value is "<foo>" instead of "foo" at server side.
> When creating attachment of the following code:
> org.apache.cxf.attachment.AttachmentUtil.createAttachment(InputStream, InternetHeaders)
> There's a id conversion at first. But in the following header processing, there's no
id conversion for Content-ID.
> Since Content-ID conversion is needed for id("new AttachmentImpl(id)"), I think it is
also useful for headers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message