Html encoding SOAP response

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>
 
M

Martin Honnen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top