Title: RE: MIME and DIME

Eric,

You should be able to check the HTTP header for the "Accept:" parameter. I know that Axis puts both 'application/dime' and 'multipart/related' in there. I suspect that .NET puts 'application/dime' in its "Accept:" parameter as well.

HTH,

Peter


-----Original Message-----
From: Eric Jain [mailto:[EMAIL PROTECTED]]
Sent: 04 July 2003 12:01
To: [EMAIL PROTECTED]

RE: MIME and DIME>     MessageContext msgContext =
MessageContext.getCurrentContext();
>     Message response = msgContext.getResponseMessage();
>     response.getAttachmentsImpl().setSendType(
>
> org.apache.axis.attachments.Attachments.SEND_TYPE_DIME);
>
>     response.addAttachmentPart(response.createAttachmentPart(
>                                new DataHandler(new
> FileDataSource(tempFile))));

Thanks, this solves one half of the problem :-)


> However, I'm not sure that it is possible to determine which type a
> client supports, and thus change the attachment format based on that.

This would be important. Does anyone know how to detect .NET clients?
Maybe through an HTTP header value? If not, we will have to require a custom SOAP header to be set that specifies the expected attachment type. Ugly...


--
Eric Jain

Reply via email to