[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

File Upload using XML WebServices

pberendt

7/15/2003 1:59:00 PM

Hello,
I need to create an XML WebService that will allow to upload files to
the server. Does anyone have an example of such service or know where
I could find any information that could help me in building it?

I am a newbie in WebServices programming and SOAP so I need something
that will explain the process in detail.

Thank you in advance

p@b10
2 Answers

James

7/17/2003 9:52:00 AM

0

You can make use of WSE 1.0 which support attachment in
WS.

James

>-----Original Message-----
>Hello,
>I need to create an XML WebService that will allow to
upload files to
>the server. Does anyone have an example of such service
or know where
>I could find any information that could help me in
building it?
>
>I am a newbie in WebServices programming and SOAP so I
need something
>that will explain the process in detail.
>
>Thank you in advance
>
>p@b10
>.
>

dancummings

7/17/2003 1:17:00 PM

0

Hiya,

You need to convert the binary file into something that can be
transferred via XML. The easiest way is to Base64 encode the binary so
that it's represented as a string. This means that the code that
consumes the webservice must convert the binary to Base64 before
sending it as a parameter and then your webservice code must convert
the parameter back into its' binary form.

Fortunately MS saw this one coming and put in a pair of static Base64
conversion methods into the .NET Framework :

System.Convert.ToBase64String
and
System.Convert.FromBase64String

You'll need to get your binary into a byte array to pass to
ToBase64String and FromBase64String will return a byte array.

Hope this helps!

Dan.

pberendt@wsb-nlu.edu.pl (P@B1o) wrote in message news:<5073e15a.0307150559.343b4ed4@posting.google.com>...

> Hello,
> I need to create an XML WebService that will allow to upload files to
> the server. Does anyone have an example of such service or know where
> I could find any information that could help me in building it?
>
> I am a newbie in WebServices programming and SOAP so I need something
> that will explain the process in detail.
>
> Thank you in advance
>
> p@b10