Your rpcserver (and probably client, too) wrongly
presume that characters OTHER THAN "<" (less-than)
and "&" (ampersand) must be encoded. According to the
XML-RPC spec., only those 2 characters need-be
encoded, and this also works with all compliant XML
parsers as well. I suggest you simply remove code
that encodes characters such as ">" (greater-
than), "'" (quote), etc.
For instance, the following request/response work fine
where the requestor is a Perl script
(Frontier::Client) and the responder is your ASP
XMLRPC rpcserver (modified to en/decode only per the
XML-RPC):
The string argument is, itself, XML and looks like
this:
<?xml version="1.0"?>
<trade>
<trade_num>56&lt;/trade_num>
<trader_initials>APR&lt;/trader_initals>
</trade>
The properly encoded XML-RPC request (via
Frontier::Client in perl) is this:
<?xml version="1.0"?>
<methodCall>
<methodName>AllieHello.HelloWorld</methodName>
<params>
<param><value><string>&lt;?xml version="1.0"?>
&lt;trade>
&lt;trade_num>56&lt;/trade_num>
&lt;trader_initials>APR&lt;/trader_initals>
&lt;/trade>
</string></value>
</param>
</params>
</methodCall>
Your ASP XMLRPC rpcserver (modified) returns this
response:
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string>&lt;?xml version="1.0"?>
&lt;trade>
&lt;trade_num>56&lt;/trade_num>
&lt;trader_initials>APR&lt;/trader_initals>
&lt;hello>World!&lt;/hello>
&lt;/trade></string>
</value>
</param>
</params>
</methodResponse>
This is as it should be, I think, rather than
en/decoding all of the ">" (greater-than)'s and other
characters as well.