chunking with DimeAttachment

From: Ramadass (anonymous_at_discussions.microsoft.com)
Date: 08/26/04


Date: Thu, 26 Aug 2004 13:12:44 -0700

I am currently implementing a web service which has to
transfer large file (2GB). I am using TCP and SoapService
and SoapClient . I can not use streaming and have to use
dime attachments. I have set the
DimeAttachment.ChunkSize, but this doesnt seem to have
any effect and the memory consumption seems to be
enormous. I am using WSE 2.0 with service pack 1. Does
ChunkSize not work with WSE2.0 SP1??

my SoapMethod in the SoapService looks like the following

SoapContext context = ResponseSoapContext.Current;
DimeAttachment dime = new DimeAttachment
("text/application",TypeFormat.MediaType,@"C:\TestFiles\te
st1.txt");
dime.ChunkSize = 32768;
context.Attachments.Clear();
context.Attachments.Add(dime);

My Soapclient method looks like this
SoapEnvelope tempEnv = base.SendRequestResponse
("CreateDimeAttachment",env);
if(tempEnv.Context.Attachments.Count == 1)
{
Stream s = tempEnv.Context.Attachments[0].Stream;
byte[] bytes = new byte[s.Length];
s.Read(bytes,0,bytes.Length);
s.Close();
FileStream fs = File.OpenWrite(@"C:\TEMP\testReply.txt");
fs.Write(bytes,0,bytes.Length);
fs.Close();
}

Am i doing something wrong in the way i am chunking??
Ramadass



Relevant Pages

  • Re: WSE2.0 does not honor REPLYTO and FAULTO in SoapEnvelope?
    ... SoapClient and SoapService now which works well. ... > Is your services an ASP.NET web service? ... > send message to the ReplyTo. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: UserNameToken with SendNone on Password
    ... > that it's a web service so it's using soap stuff under neath. ... the service proxy inherits from SoapClient. ... the service interface inherits from SoapService. ... there is no secure way to use UsernameTokens. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • asmx without IIS
    ... if I take my existing normal web service ... > SoapService and change all my web service methods to SoapMethod and change ... > client app and I will still need to create a virtual directory and use IIS. ... > So the bottom line is: whenever the http is involved I need to use IIS. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Register SoapService class for the TCP and HTTP
    ... SoapService and change all my web service methods to SoapMethod and change ... whenever the http is involved I need to use IIS. ... SoapService/Client over TCP. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: WSE2.0 does not honor REPLYTO and FAULTO in SoapEnvelope?
    ... > SoapClient and SoapService now which works well. ... > Pete Wood ... >> Is your services an ASP.NET web service? ... >> send message to the ReplyTo. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)

Loading