Link to home
Start Free TrialLog in
Avatar of bryker
bryker

asked on

WebMethods and Byte Arrays


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.
ASKER CERTIFIED SOLUTION
Avatar of Hummusx
Hummusx

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bryker
bryker

ASKER

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.