Hello Trapulo,
I think the BASE64 encoding is the reasonable approach for your scenario.
Generally, there're two common encoding methods for concerting between
string text and binary byte array, base64 and hex string.
For base64 encoding, it conform to the standard base64 encoding rules and
..net framework's Convert class implement this according to the standard.
For Hex encoding, that means we use two hex char(ascii char) to represent a
byte in string, thus, hex encoding will make the encoded string lengh twice
as the original byte stream.
As for the large message size after text encoding problem you suffer here,
I think you may consider adding some compression process against the soap
message or partially on some certain fragment. There are some articles
describing use zip components to compress webservice text content:
#Web Service Compression with .NET CF
http://blogs.msdn.com/windowsmobile/...03/345934.aspx
#Web Service Compression
http://weblogs.asp.net/pglavich/arch.../24/62475.aspx
Here are some available 3rd party zip component librarires:
#commercial, shareware, freeware, and open source zip components
http://datacompression.info/Zip.shtml
BTW, as for those encoding like Utf-8 or Unicode... they're specific to
text encoding for different charset in multilingual environment, not
specific to binary text converting. Also, are you directly pass the string
(contain XML data) as parameter (or return type) of webservice methods? If
so, this is not recommended and the best practice for transfering xml data
in webservice method is to use the .net framework XmlDocument class. See
below article:
#Rant: Don't return XML in string variables!
http://blogs.msdn.com/mpowell/archiv...12/130637.aspx
Hope this helps. Please let me know if there is anything else you wonder.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.