473,769 Members | 4,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DIME: Sending Binary Files of Unknown Format

The sample code from Microsoft contains the following statement:

DimeAttachment dimeAttach = new DimeAttachment( "image/gif",
TypeFormat.Medi aType, @"C:\images\tes t.gif");

In my specific application scenario (document management application) we
deal with a wide range of documents in a variety of formats. For the most
part, our application stores, retrieves and delivers the documents to the
client workstations. At that point the documents are opened and edited via
their natively associated applications.

So I won't know specifically for a variety of image types what is the type
(i.e. "image/gif"). Does this need to be specified to match the type of the
file? Or can this be anything I like? All I want to do is transport a binary
file of unknown format from the server and save it on the workstation. Once
it is saved on the workstation, the file extension will be used to determine
it's associated application as is standard in the Windows environment.

Thanks!

- Joe Geretz -
Nov 23 '05 #1
1 1464
Joseph Geretz wrote:
The sample code from Microsoft contains the following statement:

DimeAttachment dimeAttach = new DimeAttachment( "image/gif",
TypeFormat.Medi aType, @"C:\images\tes t.gif");

In my specific application scenario (document management application) we
deal with a wide range of documents in a variety of formats. For the most
part, our application stores, retrieves and delivers the documents to the
client workstations. At that point the documents are opened and edited via
their natively associated applications.

So I won't know specifically for a variety of image types what is the type
(i.e. "image/gif"). Does this need to be specified to match the type of the
file? Or can this be anything I like? All I want to do is transport a binary
file of unknown format from the server and save it on the workstation. Once
it is saved on the workstation, the file extension will be used to determine
it's associated application as is standard in the Windows environment.

Thanks!

- Joe Geretz -

i belive it´s not important to specify the type. the type seems to be be
a mimi-type, but i've never specified a standard mime-type and have
never encountered a problem. so i believe you can put anything you want.
Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4064
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I can pass a max of 512 words to it at a time. So I would pass them in chunks of 512 words until the whole file has been processed. I haven't worked with binary files before so I'm confused with how to store the binary file into memory. What sort of...
4
6384
by: Scott, Killer of all Ninjas | last post by:
It seems incredulous to me that it is so difficult to write the contents of a memory stream to a file. I'm certain that I'm missing something simple. I am retrieving a memory stream from a DIME attachment: MyDimeService svc = new MyDimeService(); svc.CreateDimedImage(); if (svc.ResponseSoapContext.Attachments.Count == 1) {
0
296
by: Champika Nirosh | last post by:
Hi All, I use WSE 2.0 / DIME to send a zip file of size 9.2 MB. I send file of size less than this success fully but with this the client basically get the exception "dime format exception". The code is follows.. what am I doing wrong here..? Nirosh.
3
5108
by: Ipsita | last post by:
Hi! I am trying SOAP with DIME attachments in web services. For example say, I have a file resume.pdf stored somewhere on my server. How does the web service send the file to the client, so that the client can store it and also read from it. I am trying out with C# and ASP.NET. Server Side Web Method: -----------------------
1
2446
by: Ipsita | last post by:
Hi! I am trying SOAP with DIME attachments in web services. The web service sends the file as attachment say "test.doc", and the client has to read that and populate it in a textbox control. I had asked this question earlier, and got the reply that the data is tranferred in binary format on the wire. I read the stream, and convert it to string, but I get some junk characters in my textbox. I am writing my code below, so that you can see...
1
1435
by: Modica82 | last post by:
Hi all, I have been trying to find a way to send a PDF from my web service. I have had the idea of sending back a byte array, but to be honest the efficiency issue is there and i would like to find another route if possible. I have started to read bits and pieces about DIME and WSE but what i need to know is can i utilise this technology cross platform?? For instance someone who will consume this web service is coding in some form of...
3
2608
by: Joseph Geretz | last post by:
I'm working on an file transfer gateway using WSE with DIME for file attachments. Our goal is to replace our direct file repository access (via windows network folder sharre) with the Web Service gateway for security purposes. As it stands now, all workstations have direct read-write access to the file repository share. The Web Service gateway will secure this for us. While the web service gateway is more secure, it doesn't perform...
3
4004
by: Matt B | last post by:
Does anyone know if DIME is available for Visual Studio.NET 2005? I have Visual Studio.NET 2003 and I installed the Web Services Extension pack 2.0 in order that I could use DIME. Seems to work well. I'll probably getting VS.NET 2005 soon, which uses Extension pack 3.0. I know this extension pack includes MTOM - supposed to be DIME's successor - but does it also include DIME? Anyone know?
2
9789
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte array. Thus i'm converting a byte array to sbyte array and sending through web service. The converted SByte contains negative numbers wihch are resulting in an error "java.lang.ArrayIndexOutOfBoundsException: -106" Byte => SByte...error...
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.