Assuming you added the interceptor onto the clients IN chain, it should add them to the response context. That said, it won't be a Map<String<List<String>>. It will be a "List<Attachment>" (technically, a LazyAttachmentCollection). Get the responseContext EntrySet iterator and iterate over what is in there. That might help.
(BTW: the other option would be to have the interceptor stick the Attachment map into a public ThreadLocal or something that can be retrieved by the client code.) > And can you please let me know the maximum size limit of a SOAP > attachment in CXF. Honestly, I don't think there is one. Once the attachment gets over a certain size (default is 100K), if we need to unstream it off the wire immediately (example, to get the third attachment when the current wire position is on the second one), we spool it to temp files on disk. Thus, it may depend on the file system. Dan On Wednesday 30 April 2008, Bharath Thippireddy wrote: > Dan, > > Does the work around really work.We retrieve the attachements from the > message object and assign them on the same object.Does this add them > to the request or the response contexts?.I could see the attachments > coming in on the interceptor but not on the client yet. > > http://www.nabble.com/Re:-SoapWithAttachments-p16500116.html > > message.put("ATTACHMENTS", message.getAttachments()); > > Map<String,List<String>> attachments = (Map<String,List<String>>) > requestContext.get("ATTACHMENTS"); > or > Map<String,List<String>> attachments = (Map<String,List<String>>) > responseContext.get("ATTACHMENTS"); > > still returns null. > > And can you please let me know the maximum size limit of a SOAP > attachment in CXF. > > thanks and regards, > Bharath > > Daniel Kulp <[EMAIL PROTECTED]> wrote on 04/29/2008 03:04:25 PM: > > Unfortunately, right now, there isn't. About a month ago, I dug > > into this a little bit: > > http://www.nabble.com/Re:-SoapWithAttachments-p16500116.html > > > > There is a workaround there. Could you log a feature request in > > Jira > > to > > > make sure it's tracked? > > > > Thanks! > > Dan > > > > On Tuesday 29 April 2008, Bharath Thippireddy wrote: > > > How can we retrieve the soap attachments on the CXF Client.When i > > > try the following it returns a null. > > > > > > BindingProvider bp = (BindingProvider)port; > > > java.util.Map<String,Object> responseContext = > > > bp.getResponseContext(); > > > (Map<String,List<String>>)responseContext.get(MessageContext. > > > INBOUND_MESSAGE_ATTACHMENTS) > > > > > > thanks and regards, > > > Bharath > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
