Title: RE: MIME and DIME

Eric,

I think you have to explicitly set the attachment type in your SOAP method. This is the code that we use to add a DIME attachment to the response message:


    //
    // Attach the temporary file to the response message.
    //
    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))));

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. I guess the best you can hope for is to see what format the client sends its attachments in, and use that format for the reponse.

Hope this helps,

Peter

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

>
http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/DotNetInterop

Been there, read that...

The wiki mentions that an Axis server accepts both MIME and DIME attachments, and how to instruct an Axis client to use either, but not how to make sure that an Axis server uses the appropriate type for returning messages (if this is possible).

--
Eric Jain

Reply via email to