Doubt in SOAP with DIME attachments!

Discussion in 'ASP .Net Web Services' started by Ipsita, Oct 26, 2004.

  1. Ipsita

    Ipsita Guest

    Hi!

    I was going through the WSE 2.0 documentation to try SOAP with DIME
    attachments. The example shows the server sending an image file and
    the client displaying it in a picture box control. How do I do it, if
    the server has to say eg a doc/text/pdf file and the client has to
    read that and show that in a textbox control. Also how will the client
    save it on to its local machine.

    Please help me in this matter.

    Thanks
    Ipsita
     
    Ipsita, Oct 26, 2004
    #1
    1. Advertising

  2. Ipsita

    Dan Rogers Guest

    Hi Ipsita,

    When you consider that display of a particular file types requires the
    appropriate display target (e.g. a picture box for a picture, an instance
    of word for a word document, and an instance of Acrobat Reader for PDF
    files, etc, I doubt that you'll be successful in displaying every
    non-picture file type in a text box.

    If you think about how the web browser might be able to associate the files
    it receives from an HTTP GET request and launch the right viewers, you can
    observe that the first thing that happens is that the file is saved to
    disk. And then a shellExecute win32 call is launched, passing the file
    name, including its extension. The normal windows extension mechanism does
    the rest.

    For a .Net client, writing the file is simple - you could use a
    streamwriter, or whatever is appropriate. Don't use a textwriter to write
    a binary file, however. Then to launch the right viewer, you need to
    launch the right reader (e.g.)
    System.Diagnostics.Process.Start(new
    System.Diagnostics.ProcessStartInfo(path));
    Passing the right path to the file you've written.

    If you have a control that is compatible with the data you received in the
    attachment, such as a text box for a unicode string, you can direclty
    assign the instance of the data to the control. You cannot just assign a
    binary word document in memory to a text box, however, as you would need a
    special control that has a property that is capable of decoding a word
    document file from an in memory instance.

    I hope this helps

    Dan Rogers
    Microsoft Corporation
    --------------------
    >From: (Ipsita)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: Doubt in SOAP with DIME attachments!
    >Date: 25 Oct 2004 22:16:43 -0700
    >Organization: http://groups.google.com
    >Lines: 13
    >Message-ID: <>
    >NNTP-Posting-Host: 24.6.231.155
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1098767803 27715 127.0.0.1 (26 Oct 2004

    05:16:43 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Tue, 26 Oct 2004 05:16:43 +0000 (UTC)
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
    ul.t-online.de!t-online.de!news.glorb.com!postnews1.google.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:26236
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >Hi!
    >
    >I was going through the WSE 2.0 documentation to try SOAP with DIME
    >attachments. The example shows the server sending an image file and
    >the client displaying it in a picture box control. How do I do it, if
    >the server has to say eg a doc/text/pdf file and the client has to
    >read that and show that in a textbox control. Also how will the client
    >save it on to its local machine.
    >
    >Please help me in this matter.
    >
    >Thanks
    >Ipsita
    >
     
    Dan Rogers, Nov 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sumaira Ahmad

    Encrypting Dime Attachments

    Sumaira Ahmad, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    368
    Sumaira Ahmad
    Nov 9, 2004
  2. =?Utf-8?B?U3ZlbiBUaG9yc2Vu?=

    REALLY slow perfromance when posting DIME attachments

    =?Utf-8?B?U3ZlbiBUaG9yc2Vu?=, May 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    583
    =?Utf-8?B?U3ZlbiBUaG9yc2Vu?=
    May 30, 2005
  3. Chris C

    DIME Attachments

    Chris C, Aug 13, 2004, in forum: Python
    Replies:
    1
    Views:
    441
    Uwe Hoffmann
    Aug 13, 2004
  4. Mike Schmidt

    Using DIME Attachments with AXIS 1.1

    Mike Schmidt, Oct 8, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    353
    Mike Schmidt
    Oct 8, 2003
  5. Replies:
    0
    Views:
    92
Loading...

Share This Page