chunking with DimeAttachment
From: Ramadass (anonymous_at_discussions.microsoft.com)
Date: 08/26/04
- Next message: HongMei Ge: "Re: Interop with RSA Secure-WS product"
- Previous message: Michael Riggio: "Re: WSE 2 and impersonation"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: HongMei Ge: "Re: Interop with RSA Secure-WS product"
- Previous message: Michael Riggio: "Re: WSE 2 and impersonation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|