Hi Sergey, As you said the Content-Location being changed to lower case. I checked both while iterating the MimeHeaders (s.o.p in while) and I tried to check the map values before sending the attachment. All having the correct Name(including Content-Location) and Values. Suppose I am sending 3 attachments, the first attachment having the Correct Content-Location and its value. The ramaining 2 attachments having the above said issue.
Even I hard-coded the Content-Location name and value pair and add it to the MultiValuedMap. It too having the same issue. But when I saw in the soapui, I faced the issue. Hence the map contains the exact name and value pairs, but after sending the attachment the Content-Location gets changed. I am not able to trigger out this issue. Regarding the angular braces, It is not in the Content-Id, In boundary of the content header like boundary="uuid:97...";start="<<90>>". Please help me trigger out this issue. Regards Saravanan R Sergey Beryozkin-5 wrote: > > Hi > > So what I understand is that the root part has a proper Content-Location > (with C & L being capital) header, while all the remaining parts have a > 'content-location' header thus when you try to get them (from SoapUI ?) > you're getting 'null' because of a case-sensitivity issue... Is it what is > happening ? > > Also, you see double "<<" and ">>" Content-IDs, right ? > > When you iterate over SAAJ attachments and print the headers, do you see > the > existing Content-ID values ? Are they already 'wrapped' with '<' and '>' ? > CXF AttachmentSerializer also adds '<' and '>' too, so if yes then at the > moment you'll need to ensure '<' and '>' are stripped and in meantime > AttachmentSerializer can get fixed to check for '<' before appending '<'. > > Also can you please try to iterate over List<Attachment>, after you've > built > it, and verify the headers have not been modified (i.e, you still see > 'Content-Location' as opposed to 'content-location') ? > > cheers, Sergey > > On Thu, May 20, 2010 at 5:02 PM, SaravananRamamoorthy < > saravanan.ramamoorth...@gmail.com> wrote: > >> >> Hi All, >> >> I am trying to send attachment as a response using Jax - RS. >> The system gets the attachment details from Saaj api to Jax - RS and it >> need >> to send as a response. >> >> Please see the code below: >> >> List<Attachment> responseAttach = new ArrayList<Attachment>(); >> >> while(attach.hasNext()) //attach is an Iterator receives from saaj >> { >> AttachmentPartImpl impl = attach.next(); >> MultiValuedMap<String,String> map = new MetadataMap<String,String>(); >> Iterator itr = impl.getAllMimeHeaders(); >> while(itr.hasNext()) >> { >> MimeHeader mimeHdr =(MimeHeader) itr.next(); >> >> >> System.out.println("Name::"+mimeHdr.getName()+"Value::"+mimeHdr.getValue()) >> map.add(mimeHdr.getName(),mimeHdr.getValue()); >> >> } >> >> responseAttach.add(impl.getDataHandler().getInputStream(),map); >> >> } >> return responseAttach; >> >> All the attachments are received correctly with the Content Header like >> Content-ID,Content-Type. >> But in the Content-Location I am facing the following issue. >> >> >> First attachment having the Content-Location value correctly.The >> >> subsequent Content-Location having only null values and it displays in >> >> lower-case(content-location). But when I trace the Content-Location >> >> inside the while loop it displays all the Content-Location properly. >> >> Please provide the solution to fix this issue. >> >> Regards >> Saravanan Ramamoorthy >> >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://old.nabble.com/content-location-issue-in-attachment-response-tp28623343p28623343.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://old.nabble.com/content-location-issue-in-attachment-response-tp28623343p28629634.html Sent from the cxf-user mailing list archive at Nabble.com.