Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2003

Tip: Looking for answers? Try searching our database.

DIME Attachment from Client to Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Senthil - 06 Oct 2003 22:09 GMT
hi,
  I need to write an application which needs to transfer
a binary file from client to server. I will be able to
send it as DIME attachment along with the SOAP message.

This example which uses WS Attachments from Webservice to
Client
http://www.xmlforasp.net/codeSection.aspx?csID=96

Does anyone have idea about sending a DIME attachment
from client to a webservice.


Thanks
sendhil
Eric - 07 Oct 2003 02:19 GMT
It's similar to sending it from the web service to the client.  Make sure
you modify the proxy class so that it derives from
Microsoft.Web.Services.WebServicesClientProtocol.

Client:
           // Create instance of web service
           wsUpload = new WSUpload.WSUpload();

           // Create attachment from posted file stream
           DimeAttachment da = new DimeAttachment("plain/text; charset=
utf-8",
                       TypeFormatEnum.MediaType,
hifUpload.PostedFile.InputStream);

           // Add it and send it to the server
           wsUpload.RequestSoapContext.Attachments.Add(da);

           wsUpload.TransferFile();

Server:
           // Get the stream and do something with it
           StreamReader sr = new StreamReader(
               HttpSoapContext.RequestContext.Attachments[0].Stream);

> hi,
>    I need to write an application which needs to transfer
[quoted text clipped - 10 lines]
> Thanks
> sendhil
Scott McFadden - 08 Oct 2003 17:22 GMT
When I tested the DIME sample app it was more than twice as slow as just
sending a regular Soap based64 encode byte array.  DIME is not ready for
prime time yet.

scottm

> It's similar to sending it from the web service to the client.  Make sure
> you modify the proxy class so that it derives from
[quoted text clipped - 34 lines]
> > Thanks
> > sendhil

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.