Thanks Dan. I have another question on the outbound side. I have a
SOAPHandler<SOAPMessageContext> implementation which adds an attachment
(gif) to the message roughly like so:

SOAPMessage soapMessage = smc.getMessage();

javax.xml.soap.AttachmentPart attachment;
InputStream input = ...
byte[] data = new byte[input.available()];
input.read(data);
attachment = soapMessage.createAttachmentPart();
attachment.setRawContentBytes(data, 0, data.length, "image/gif");
attachment.setMimeHeader("Content-Transfer-Encoding", "binary");
soapMessage.addAttachmentPart(attachment);
            
soapMessage.saveChanges();

This works fine with the latest snapshot of 2.0.x, I can see the
LoggingFeature printing out the attachment in the outbound message.
However when I try with 2.1.x, it doesn't appear to add the attachment
to the outbound message, but no exceptions are thrown.

Anything obvious I'm doing wrong here?

Colm.




-----Original Message-----
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: 09 December 2008 17:16
To: [email protected]
Cc: Colm O hEigeartaigh
Subject: Re: Getting attachments from the SOAP message context


There is the JAXWS standard:

Map<String, DataHandler> atts = 
dataHandlerscontext.get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);


Dan


On Tuesday 09 December 2008 12:11:06 pm Colm O hEigeartaigh wrote:
> Hi guys,
>
> How do I get inbound attachments from the SOAPMessageContext in a
> SOAPHandler? Something like this used to work:
>
>   Object[] attachments =
>
((SOAPMessageContextImpl)context).getWrappedMessage().getAttachments().t
> oArray();
>
> Thanks,
>
> Colm.



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to