470,848 Members | 1,569 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

Sending binary file to a web service

Hi there,

How do I send binary files to a web service from VBScript?

I read a file, converted it into a stream and submitted using xmlhttp.send
(post method).

objXmlhttp.send BinaryStream.Read(BinaryStream.Size)

Is this the correct approach?

If so, how do I receive the stream in my web service? Receiving it as a
Stream object doesn't work.

Your help will be greatly appreciated. I've been struggling for the past
two days with this.

Regards,
Anand
Mar 1 '06 #1
2 2277
"Andy" <ar******@ivesia.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi there,

How do I send binary files to a web service from VBScript?

I read a file, converted it into a stream and submitted using xmlhttp.send
(post method).

objXmlhttp.send BinaryStream.Read(BinaryStream.Size)

Is this the correct approach?

If so, how do I receive the stream in my web service? Receiving it as a
Stream object doesn't work.


Hi Andy,

How about receiving byte[]? Will that work for you?

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCT
MCSD.NET Early Achiever
Mar 1 '06 #2
Hi Andy,

You've got a couple of options. Firstly, you could use the WSE model to add
attachments to your XML Doc using WS-Attachment.

Secondly, you could Base64 encode your binary to convert your data into a
string that can be placed safely inside your xml.

I probably wouldn't use binary streams or byte arrays as some systems that
your data passes through may mangle the data.

HTH,

Adam

--
Adam May
Sydney, Australia
MCSD.Net
"Andy" wrote:
Hi there,

How do I send binary files to a web service from VBScript?

I read a file, converted it into a stream and submitted using xmlhttp.send
(post method).

objXmlhttp.send BinaryStream.Read(BinaryStream.Size)

Is this the correct approach?

If so, how do I receive the stream in my web service? Receiving it as a
Stream object doesn't work.

Your help will be greatly appreciated. I've been struggling for the past
two days with this.

Regards,
Anand

Mar 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Cindy Lee | last post: by
10 posts views Thread by Fabuloussites | last post: by
7 posts views Thread by D. Patrick | last post: by
9 posts views Thread by Miro | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.