Html encoding SOAP response

  • Thread starter Thread starter Casper Hornstrup
  • Start date Start date
C

Casper Hornstrup

Is there anyway I can make my xml webservice not htmlencode the response
from a call to an API?

I have:
public int PerformOperation(string operation, out string result)

The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?

<soap:Body>

<PerformOperationResponse xmlns="http://tempuri.org/">

<PerformOperationResult>

0

</PerformOperationResult>

<result>

&lt;RetrieveTreeResponse id=&quot;123&quot;&gt;

&lt;Node id=&quot;1&quot;
title=&quot;TopLevelNode1&quot;&gt;

&lt;Node id=&quot;2&quot;
title=&quot;2LevelNode1&quot; /&gt;

&lt;Node id=&quot;3&quot;
title=&quot;2LevelNode2&quot; /&gt;

&lt;/Node&gt;

&lt;Node id=&quot;4&quot;
title=&quot;TopLevelNode2&quot; /&gt;

&lt;/RetrieveTreeResponse&gt;

</result>

</PerformOperationResponse>

</soap:Body>
 
Casper said:
Is there anyway I can make my xml webservice not htmlencode the response
from a call to an API?

I have:
public int PerformOperation(string operation, out string result)

The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?

Try to use a parameter of type XmlNode instead of a string.
 
Back
Top