DIME Transfer to 98 client? (long message...PLEASE HELP!)

  • Thread starter Thread starter Levi Wilson
  • Start date Start date
L

Levi Wilson

I have a web service that adds a DIME attachment:

[WebMethod]
public void GetFile(string filename)
{
SoapContext sc = HttpSoapContext.ResponseContext;
DimeAttachment dimeFile = new DimeAttachment("application/DIME",
TypeFormatEnum.MediaType, @"c:\temp\" + filename);

sc.Attachments.Add(dimeFile);

return;
}

The client that calls this connets to a remote object on another
server to get a list of the needed files to download, then starts to
download these files using the web method above. This works fine on
client machines except for the ones with Windows 98. I have packaged
the Microsoft.Web.Services DLL with the application so the clients can
parse the DIME message. This works, SOMETIMES, however it is
extremely slow (probably why WSE isn't supported on 98). I'm not
worrried about the speed of the download, but I am concerned of how
much it bogs down the system, becuase I have a server-side sponsor
object, therefore the client has a thread that keeps calling a
KeepAlive() method, so when a 98 client is trying to parse the DIME
message, the CPU is so bogged down that the KeepAlive() thread doesn't
get called in time. What I need is a good solution to transfer files
to my 98 clients, and I would LIKE to use my DIME web method still,
but how do I on the 98 clients, SOAP Toolkit 3.0 maybe? I tried using
a web method that returns a byte[] of the file, however this causes
the aspnet_wp.exe to become recycled because it tries to buffer the
entire file into RAM... So, any help on this issue would be great!

Thanks in advance,

Levi
 
I got this working...on the client machines, use Soap Toolkit 3.0 as follows
(C#):

//
// Low-Level
//
HttpConnector30 connector = new HttpConnector30Class();
connector.set_Property("EndPointURL",
"http://localhost:8080/DimeService/FileService.asmx");
connector.Connect();
connector.set_Property("SoapAction", "DimeService/GetFile");
connector.BeginMessage();
SoapSerializer30 serializer = new SoapSerializer30Class();
serializer.Init(connector.InputStream);
serializer.StartEnvelope("soap", "", "utf-8");
serializer.WriteXml("<soap:Body>");
serializer.StartBody("");
serializer.WriteXml("<GetFile xmlns=\"DimeService\">");
serializer.WriteXml("<filename>");
serializer.WriteString("TestFile.doc");
serializer.WriteXml("</filename>");
serializer.WriteXml("</GetFile>");
serializer.EndBody();
serializer.EndEnvelope();
SoapReader30 reader = new SoapReader30Class();
DimeParser30 parser = new DimeParser30Class();
IReceivedAttachment file;
ReceivedAttachments30 attachments;
reader.LoadWithParser(connector.OutputStream, (IMessageParser)parser,
"DimeService/GetFile");
attachments = reader.Attachments;
file = attachments[0];
file.SaveToFile("c:\\TestFile.doc", true);

Levi Wilson said:
I have a web service that adds a DIME attachment:

[WebMethod]
public void GetFile(string filename)
{
SoapContext sc = HttpSoapContext.ResponseContext;
DimeAttachment dimeFile = new DimeAttachment("application/DIME",
TypeFormatEnum.MediaType, @"c:\temp\" + filename);

sc.Attachments.Add(dimeFile);

return;
}

The client that calls this connets to a remote object on another
server to get a list of the needed files to download, then starts to
download these files using the web method above. This works fine on
client machines except for the ones with Windows 98. I have packaged
the Microsoft.Web.Services DLL with the application so the clients can
parse the DIME message. This works, SOMETIMES, however it is
extremely slow (probably why WSE isn't supported on 98). I'm not
worrried about the speed of the download, but I am concerned of how
much it bogs down the system, becuase I have a server-side sponsor
object, therefore the client has a thread that keeps calling a
KeepAlive() method, so when a 98 client is trying to parse the DIME
message, the CPU is so bogged down that the KeepAlive() thread doesn't
get called in time. What I need is a good solution to transfer files
to my 98 clients, and I would LIKE to use my DIME web method still,
but how do I on the 98 clients, SOAP Toolkit 3.0 maybe? I tried using
a web method that returns a byte[] of the file, however this causes
the aspnet_wp.exe to become recycled because it tries to buffer the
entire file into RAM... So, any help on this issue would be great!

Thanks in advance,

Levi
 
Back
Top