You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kid_79 <ch...@hotmail.com> on 2009/07/14 19:30:31 UTC

Content-ID null in to saaj's message

Hi all,
I have this problem with content-ID.
In my RequestInterceptor I have a message (cxf's SoapMessage) with
attachment and I get content-ID in this way:

Collection<Attachment> atts = message.getAttachments();
if (atts != null) {
    for (Attachment a : atts) {		        
            String contentID = a.getId();
            ....
    }
}
contentID is ok.

Now if I use a SOAPMessage (saaj) in my RequestInterceptor in this way:

SOAPMessage saaj = message.getContent(SOAPMessage.class);
Iterator<AttachmentPart> allegati = saaj.getAttachments();
while (allegati.hasNext()){
    AttachmentPart attachmentPart = allegati.next();
    String contentId = attachmentPart.getContentId();
    ....
}
 
I get contentId = null. Attachments there are.

Can you help me?
Thanks
-- 
View this message in context: http://www.nabble.com/Content-ID-null-in-to-saaj%27s-message-tp24484200p24484200.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Content-ID null in to saaj's message

Posted by Daniel Kulp <dk...@apache.org>.
I just fixed this:
https://issues.apache.org/jira/browse/CXF-2344

Dan


On Tue July 14 2009 1:30:31 pm Kid_79 wrote:
> Hi all,
> I have this problem with content-ID.
> In my RequestInterceptor I have a message (cxf's SoapMessage) with
> attachment and I get content-ID in this way:
>
> Collection<Attachment> atts = message.getAttachments();
> if (atts != null) {
>     for (Attachment a : atts) {
>             String contentID = a.getId();
>             ....
>     }
> }
> contentID is ok.
>
> Now if I use a SOAPMessage (saaj) in my RequestInterceptor in this way:
>
> SOAPMessage saaj = message.getContent(SOAPMessage.class);
> Iterator<AttachmentPart> allegati = saaj.getAttachments();
> while (allegati.hasNext()){
>     AttachmentPart attachmentPart = allegati.next();
>     String contentId = attachmentPart.getContentId();
>     ....
> }
>
> I get contentId = null. Attachments there are.
>
> Can you help me?
> Thanks

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog