Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net and XML DOM -> Byte Array or String

Status
Not open for further replies.

klamerus

Programmer
Jun 23, 2003
71
US
I need to "send up" a complex XML structure to a SOAP request from a VB.Net program. It's also possible that we may need to do this from ASPX.

Either way, the program or page is the client to the server that we have and to which we need to upload the data.

The XML itself may have a couple of dozen tags nested a couple of levels deep. It may even have a tag with bin64 encoded data (depends on the request). We know how to create all this.

What we have had a struggling doing is finding out how to submit this to a web service (SOAP), but very recently someone suggested turning it into a byte array or string and sending it up as a single parameter.

This requires turning the XML structure into a byte array or string and returning it to an XML structure on the server. We will do this in memory in a DOM. We don't want to create a file just to upload. That will have a performance impact. We want to do this directly from the DOM structure in memory.

I've seen code for reading a file into a Byte array and sending that to a server (in XML), but I've never seen code for converting XML structure in a DOM in memory into a byte array or string.

I'm looking for how to do this so I can make this soap request.

Conversely I'd be interested in superior alternatives to this approach, but only something standard or very wide-spread (not DIME or WS-Attachment).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top