Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Html encoding SOAP response

Reply
Thread Tools

Html encoding SOAP response

 
 
Casper Hornstrup
Guest
Posts: n/a
 
      12-15-2003
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>




 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      12-15-2003


Casper Hornstrup wrote:

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

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


--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make soap request and receive soap response from php soapservice Ivan S ASP .Net 0 08-13-2008 03:35 PM
SOAP Request is repeated in the SOAP response. comp.text.xml XML 0 09-20-2006 08:41 AM
changing JVM encoding; setting -Dfile.encoding doesn't work pasmol@plusnet.pl Java 1 10-08-2004 09:50 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM
Html encoding SOAP response Casper Hornstrup ASP .Net Web Services 1 12-15-2003 08:29 PM



Advertisments