O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.8. Handling Binary Data

A SOAP message is an XML document which, according to the XML specification, must contain only legal characters in the document's character encoding. This means you can't just insert binary data into a SOAP message and ship it over the network. Therefore, sending images, files, and other binary data with SOAP requires special handling.

You can choose between several different methods for handling binary data based on the size of the data and the nature of the application. In this section, I will briefly explain three such methods and when you'd want to use each.

3.8.1. Base64 Encoding

For binary content of relatively small size, you can encode the bits into a legal character representation using any encoding/decoding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required