Soap Service – Special Characters


Hey Folks,

We all know SOAP Services has it’s own Protocol while commuting over different Platforms. Sometimes Client is willing to send special characters for there own reasons over web service but it is not permitted within SOAP protocols.

Here is the way how you can make this accessible with a tweak, while calling service replace this special characters with:

< is converted to &lt;

> is converted to &gt;

& is converted to &amp;

is converted to &quot;

Now at the other end you just need to decode it to get back the original special character that you have. Here is the code you need to write-


Here Bigtext will have decoded value coming in InputBigtext.

DecodeSpecialCharacter    DotNet     System.Net.WebUtility.’System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089′