?
Solved

WebMethods and Byte Arrays

Posted on 2003-03-14
2
Medium Priority
?
1,531 Views
Last Modified: 2012-05-04

This is kind of a long-winded question, but I don't think it's terribly complicated.  Some of it should demonstrate my lack of understanding of how Web Services work behind the scenes.

I have a large XML dataset that I need to send to a Web Service.  That works fine--my WS takes a string parameter and I send the XML string over that parameter.

However, as I said, the XML is large.  Therefore, I'm now compressing the XML (using XMILL) to binary format, on the client side, then sending that resulting byte array "over the wire" to another Web Method.  As you can imagine, this is much faster.  On the web side, I decompress that byte array back to XML and I have everything I need.

All this testing is happening on my own PC, by the way, where I have IIS running.

[1]  Thinking ahead, I know that my clients are going to allow HTTP calls through their firewall, but nothing else.  Here's the big question:  when I send that byte array to my Web Method, is it still using HTTP?

Goofy question, probably, but I understand HTTP only to send text data.  Can I assume, then, that somewhere behind the scenes, my byte array is formatted as text, somehow, then packaged into the SOAP message that's sent to my Web Method?  Can I assume that there's some kind of conversion going on to get this byte data across in a way that's palatable to HTTP?

[2]  IF THAT'S NOT TRUE, and if somehow this Web Method is not receiving its byte-array parameter over HTTP (and what else would that be?), then is there some way I can "convert" the byte array back to a String type before sending it, so that it WILL go over HTTP?  Obviously, I wouldn't want to convert it back to XML, or I'd be back to the original problem (XML dataset too large).

Please let me know if I need to explain this 2-part question further.
0
Comment
Question by:bryker
2 Comments
 
LVL 2

Accepted Solution

by:
Hummusx earned 800 total points
ID: 8137020
1) I think you aren't giving the HTTP protocol enough credit.  Firstly, the firewall is only going to be checking the port number that you are sending data to, which is going to be the HTTP port.  It is VERY unlikely that the firewall would be looking inside the packets to try to determine what you are sending.  Secondly, think about the HTTP protocol.  You can download files via HTTP, right?  Executables, zip files, PDF files, text files, etc, etc.  Most of those are NOT encoded as string while being transferred over HTTP.  Also, if you've ever worked with a web app that uploaded files, it is sent as a byte stream.

2) No need! =)
0
 

Author Comment

by:bryker
ID: 8139268
Thanks, Hummusx.  I feel better about this now, like some SysAdmin of Company A isn't going to go off on us if we're sending binary data in over their HTTP.  In fact, as you say, he probably won't even know, unless we tell him.

Woo-hoo!  I say.

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question