locked
Binary attachments in WSE 3.0 RRS feed

  • Question

  • Hello,

    I'm using WSE 3.0, but I'm having some trouble passing a binary attachment. In WSE 2.0 we had SoapEnvelope.Context.Attachments where I would put binary attachments. Where can I put attachments in WSE 3.0?
    Thanks in advance for any help given.

    Regards,
    paulo
    Friday, December 2, 2005 11:32 AM

Answers

All replies

  • I believe Soap with Attachments and DIME have fallen out of favor, and now you should just pass your previously attached data as a byte [].

    The returning soap message is supposed to have a MIME part for the byte [] sent in raw octects.  This saves on bandwidth as the raw octects should be up to 33% smaller than the base64 encoding used previously.

    Search for MTOM in WSE3.0 to see more.
    Friday, December 2, 2005 8:18 PM
  • Hello Mike and thank you for your reply.

    My problem is that I'm using a Policy to compress the information between the client and the web service, so I want to compress everything, be it byte[] or not. In WSE 2.0 I would do that clearing the original message content and using an attachment with the compressed info. However, I'm having some trouble doing the same in WSE 3.0. I'm setting both client and web service to use the new policy I defined, and I've defined 2 SoapFilters, one for compression and the other for decompression. In the ProcessMessage method of the SoapFilter I'm trying to compress and decompress the information, but it's here something is failing.
    What would be the best approach to handle a SoapEnvelope for doing what I'm trying to do?
    Thanks again for your help.

    Regards,
    paulo
    Tuesday, December 6, 2005 6:51 PM
  • Honestly, I have never used the Policies so I dont know how they work.
    But I have written a few SoapExtensions.  One of them was a compression extension.

    Check out http://www.mastercsharp.com/article.aspx?ArticleID=86&&TopicID=7 for an example. (this is not written by me)
    Thursday, December 8, 2005 10:12 PM